diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-08-25 22:14:06 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-08-25 22:14:06 +0000 |
commit | 28e44d3bbe831956a10064de2b76298316dc7cf5 (patch) | |
tree | 7df1e184931be7e8680bbac448805a2947d5bd36 /numpy | |
parent | 1bc555d8e56339777bcb31cc323e619c00cfff51 (diff) | |
download | numpy-28e44d3bbe831956a10064de2b76298316dc7cf5.tar.gz |
Fix a problem with __all__ not being copied in oldnumeric.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/include/numpy/old_defines.h | 1 | ||||
-rw-r--r-- | numpy/core/include/numpy/oldnumeric.h | 8 | ||||
-rw-r--r-- | numpy/oldnumeric/random_array.py | 10 | ||||
-rw-r--r-- | numpy/oldnumeric/user_array.py | 2 |
4 files changed, 12 insertions, 9 deletions
diff --git a/numpy/core/include/numpy/old_defines.h b/numpy/core/include/numpy/old_defines.h index 4ccb815ed..913cd3d61 100644 --- a/numpy/core/include/numpy/old_defines.h +++ b/numpy/core/include/numpy/old_defines.h @@ -162,7 +162,6 @@ #define PyArray_NATBYTE NPY_NATBYTE #define PyArray_OPPBYTE NPY_OPPBYTE -#define NPY_REFCOUNT PyArray_REFCOUNT #define PyArray_MAX_ELSIZE NPY_MAX_ELSIZE #define PyArray_USE_PYMEM NPY_USE_PYMEM diff --git a/numpy/core/include/numpy/oldnumeric.h b/numpy/core/include/numpy/oldnumeric.h index a4e69176e..7206bbe3c 100644 --- a/numpy/core/include/numpy/oldnumeric.h +++ b/numpy/core/include/numpy/oldnumeric.h @@ -1,7 +1,9 @@ #include "arrayobject.h" -#define REFCOUNT NPY_REFCOUNT -#define MAX_ELSIZE 16 +#ifndef REFCOUNT +# define REFCOUNT NPY_REFCOUNT +# define MAX_ELSIZE 16 +#endif #define PyArray_UNSIGNED_TYPES #define PyArray_SBYTE PyArray_BYTE @@ -17,6 +19,6 @@ #define SAVESPACE 0 #define SAVESPACEBIT 0 -#undef import_array() +#undef import_array #define import_array() { if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); } } diff --git a/numpy/oldnumeric/random_array.py b/numpy/oldnumeric/random_array.py index 061465d02..c5d163196 100644 --- a/numpy/oldnumeric/random_array.py +++ b/numpy/oldnumeric/random_array.py @@ -1,9 +1,11 @@ # Backward compatible module for RandomArray -__all__ = ['ArgumentError','F','beta','binomial','chi_square', 'exponential', 'gamma', 'get_seed', - 'mean_var_test', 'multinomial', 'multivariate_normal', 'negative_binomial', - 'noncentral_F', 'noncentral_chi_square', 'normal', 'permutation', 'poisson', 'randint', - 'random', 'random_integers', 'seed', 'standard_normal', 'uniform'] +__all__ = ['ArgumentError','F','beta','binomial','chi_square', 'exponential', + 'gamma', 'get_seed', 'mean_var_test', 'multinomial', + 'multivariate_normal', 'negative_binomial', 'noncentral_F', + 'noncentral_chi_square', 'normal', 'permutation', 'poisson', + 'randint', 'random', 'random_integers', 'seed', 'standard_normal', + 'uniform'] ArgumentError = ValueError diff --git a/numpy/oldnumeric/user_array.py b/numpy/oldnumeric/user_array.py index d7975d8a7..375c4013b 100644 --- a/numpy/oldnumeric/user_array.py +++ b/numpy/oldnumeric/user_array.py @@ -4,6 +4,6 @@ from numpy.oldnumeric import * from numpy.lib.user_array import container as UserArray import numpy.oldnumeric as nold -__all__ = nold.__all__ +__all__ = nold.__all__[:] __all__ += ['UserArray'] del nold |