diff options
-rw-r--r-- | numpy/compat/__init__.py | 7 | ||||
-rw-r--r-- | numpy/compat/_inspect.py | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/numpy/compat/__init__.py b/numpy/compat/__init__.py index 0b69dcf5f..2e37a4350 100644 --- a/numpy/compat/__init__.py +++ b/numpy/compat/__init__.py @@ -1,3 +1,10 @@ +"""Compatibility module. + +This module contains duplicated code from python itself or 3rd party +extensions, which may be included for the following reasons: + - compatibility + - we may only need a small subset of the copied library/module +""" import _inspect from _inspect import getargspec, formatargspec diff --git a/numpy/compat/_inspect.py b/numpy/compat/_inspect.py index 125b27156..8be0b7696 100644 --- a/numpy/compat/_inspect.py +++ b/numpy/compat/_inspect.py @@ -1,3 +1,10 @@ +"""Subset of inspect module from upstream python + +We use this instead of upstream because upstream inspect is slow to import, and +significanly contributes to numpy import times. Importing this copy has almost +no overhead. +""" + import types __all__ = ['getarspec', 'formatargspec'] |