Skip to content

Commit

Permalink
Merge pull request #514 from mattip/pypy
Browse files Browse the repository at this point in the history
ENH: fix wrapper for pypy
  • Loading branch information
j-towns authored Jun 14, 2019
2 parents 473e25e + 76d6f4e commit 541a70b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions autograd/numpy/numpy_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ class IntdtypeSubclass(cls):
def wrap_namespace(old, new):
unchanged_types = {float, int, type(None), type}
int_types = {_np.int, _np.int8, _np.int16, _np.int32, _np.int64, _np.integer}
function_types = {_np.ufunc, types.FunctionType, types.BuiltinFunctionType}
for name, obj in old.items():
if obj in notrace_functions:
new[name] = notrace_primitive(obj)
elif type(obj) in function_types:
elif callable(obj) and type(obj) is not type:
new[name] = primitive(obj)
elif type(obj) is type and obj in int_types:
new[name] = wrap_intdtype(obj)
Expand Down

0 comments on commit 541a70b

Please sign in to comment.