summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/__init__.py3
-rw-r--r--numpy/ctypeslib.py8
2 files changed, 7 insertions, 4 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py
index 42f987b24..e864fb9b2 100644
--- a/numpy/__init__.py
+++ b/numpy/__init__.py
@@ -39,12 +39,13 @@ else:
import linalg
import fft
import random
+ import ctypeslib
__all__ = ['__version__', 'pkgload', 'PackageLoader',
'ScipyTest', 'NumpyTest', 'show_config']
__all__ += core.__all__
__all__ += lib.__all__
- __all__ += ['linalg', 'fft', 'random']
+ __all__ += ['linalg', 'fft', 'random', 'ctypeslib']
if __doc__ is not None:
__doc__ += """
diff --git a/numpy/ctypeslib.py b/numpy/ctypeslib.py
index 99169ae21..1d4b7dc19 100644
--- a/numpy/ctypeslib.py
+++ b/numpy/ctypeslib.py
@@ -1,11 +1,11 @@
-__all__ = ['ctypes_load_library', 'ndpointer', 'test']
+__all__ = ['load_library', 'ndpointer', 'test', 'ctypes_load_library']
import sys, os
-from numpy import integer, product, ndarray, dtype as _dtype
+from numpy import integer, product, ndarray, dtype as _dtype, deprecate
from numpy.core.multiarray import _flagdict, flagsobj
# Adapted from Albert Strasheim
-def ctypes_load_library(libname, loader_path):
+def load_library(libname, loader_path):
if '.' not in libname:
if sys.platform == 'win32':
libname = '%s.dll' % libname
@@ -35,6 +35,8 @@ def _flags_fromnum(num):
res.append(key)
return res
+ctypes_load_library = deprecate(load_library, 'ctypes_load_library', 'load_library')
+
class _ndptr(object):
def from_param(cls, obj):
if not isinstance(obj, ndarray):