diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-07-01 20:54:24 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-07-01 20:54:24 +0000 |
commit | c00b40099043644cca23b6044c276ad72e9b8591 (patch) | |
tree | 7034cfb9e3b48e283d37b75ff967a619c6e88b2a /numpy/lib/utils.py | |
parent | b8030615d5b5bef97d212c7ef0ac7dff7e7d3bf6 (diff) | |
download | numpy-c00b40099043644cca23b6044c276ad72e9b8591.tar.gz |
Improve c_numpy.pxd a bit. Re-name get_numpy_include() to get_include() and deprecate old name. Add PyArray_ZEROS and PyArray_EMPTY macros which take type-number instead of data-type object.
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r-- | numpy/lib/utils.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index ac5b0b9e8..f91482699 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -1,7 +1,8 @@ import sys from numpy.core.numerictypes import obj2sctype -__all__ = ['issubclass_', 'get_numpy_include', 'issubsctype', 'deprecate'] +__all__ = ['issubclass_', 'get_numpy_include', 'issubsctype', 'deprecate', + 'get_include'] def issubclass_(arg1, arg2): try: @@ -12,7 +13,7 @@ def issubclass_(arg1, arg2): def issubsctype(arg1, arg2): return issubclass(obj2sctype(arg1), obj2sctype(arg2)) -def get_numpy_include(): +def get_include(): """Return the directory in the package that contains the numpy/*.h header files. @@ -21,7 +22,7 @@ def get_numpy_include(): import numpy Extension('extension_name', ... - include_dirs=[numpy.get_numpy_include()]) + include_dirs=[numpy.get_include()]) """ from numpy.distutils.misc_util import get_numpy_include_dirs include_dirs = get_numpy_include_dirs() @@ -61,3 +62,6 @@ def deprecate(func, oldname, newname): else: newfunc.__dict__.update(d) return newfunc + + +get_numpy_include = deprecate(get_include, 'get_numpy_include', 'get_include') |