summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r--numpy/lib/utils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index 1304adb42..43ccef5cd 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -41,5 +41,10 @@ def deprecate(func, oldname, newname):
else:
doc = '\n'.join([depdoc, doc])
newfunc.__doc__ = doc
- newfunc.__dict__.update(func.__dict__)
+ try:
+ d = func.__dict__
+ except AttributeError:
+ pass
+ else:
+ newfunc.__dict__.update(d)
return newfunc