diff options
author | David Cournapeau <cournape@gmail.com> | 2009-10-13 08:28:43 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2009-10-13 08:28:43 +0000 |
commit | 7b481cbd0d73630359c4739b0bb2c13a62509e66 (patch) | |
tree | d11a942d7e2075c747e3299e22f60be579f88c17 /numpy | |
parent | 32b5b409ebb252a65e6d182f0db49bde68beae80 (diff) | |
download | numpy-7b481cbd0d73630359c4739b0bb2c13a62509e66.tar.gz |
ENH: use our own inspect instead of upstream inspect to speed up numpy import times.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/ma/core.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index cee884e9d..ce3a00fd8 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -96,6 +96,7 @@ from numpy import array as narray import numpy.core.umath as umath import numpy.core.numerictypes as ntypes +from numpy.lib.inspect import getargspec, formatargspec from numpy import expand_dims as n_expand_dims import warnings @@ -128,9 +129,8 @@ def get_object_signature(obj): """ Get the signature from obj """ - import inspect try: - sig = inspect.formatargspec(*inspect.getargspec(obj)) + sig = formatargspec(*getargspec(obj)) except TypeError, errmsg: msg = "Unable to retrieve the signature of %s '%s'\n"\ "(Initial error message: %s)" |