diff options
author | bertrand <bertrand.l3f@gmail.com> | 2016-06-13 20:53:10 -0400 |
---|---|---|
committer | bertrand <bertrand.l3f@gmail.com> | 2016-07-17 20:20:39 -0400 |
commit | a05b65337725072710ee00dd695aa2df47eb5b4e (patch) | |
tree | 45da2dda163dbcf299ccefeb3d9f361bec7c6782 /numpy/_import_tools.py | |
parent | a94fd6122aa30b2cf24757c3e3e826d532c7fe6c (diff) | |
download | numpy-a05b65337725072710ee00dd695aa2df47eb5b4e.tar.gz |
MAINT,DOC: add to compat.py3k a function to load modules. Fix some doc for f2py.compile (issue #7683)
Diffstat (limited to 'numpy/_import_tools.py')
-rw-r--r-- | numpy/_import_tools.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/_import_tools.py b/numpy/_import_tools.py index 0d11d699c..eda0284fe 100644 --- a/numpy/_import_tools.py +++ b/numpy/_import_tools.py @@ -52,7 +52,7 @@ class PackageLoader(object): def _init_info_modules(self, packages=None): """Initialize info_modules = {<package_name>: <package info.py module>}. """ - import imp + from numpy.compat import npy_load_module info_files = [] info_modules = self.info_modules @@ -86,8 +86,7 @@ class PackageLoader(object): filedescriptor = ('.py', 'U', 1) try: - info_module = imp.load_module(fullname+'.info', - open(info_file, filedescriptor[1]), + info_module = npy_load_module(fullname + '.info', info_file, filedescriptor) except Exception as msg: |