[Numpy-svn] r3072 - in trunk/numpy: core/include/numpy oldnumeric

numpy-svn at scipy.org numpy-svn at scipy.org
Fri Aug 25 17:14:12 CDT 2006


Author: oliphant
Date: 2006-08-25 17:14:06 -0500 (Fri, 25 Aug 2006)
New Revision: 3072

Modified:
   trunk/numpy/core/include/numpy/old_defines.h
   trunk/numpy/core/include/numpy/oldnumeric.h
   trunk/numpy/oldnumeric/random_array.py
   trunk/numpy/oldnumeric/user_array.py
Log:
Fix a problem with __all__ not being copied in oldnumeric.

Modified: trunk/numpy/core/include/numpy/old_defines.h
===================================================================
--- trunk/numpy/core/include/numpy/old_defines.h	2006-08-25 21:33:42 UTC (rev 3071)
+++ trunk/numpy/core/include/numpy/old_defines.h	2006-08-25 22:14:06 UTC (rev 3072)
@@ -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

Modified: trunk/numpy/core/include/numpy/oldnumeric.h
===================================================================
--- trunk/numpy/core/include/numpy/oldnumeric.h	2006-08-25 21:33:42 UTC (rev 3071)
+++ trunk/numpy/core/include/numpy/oldnumeric.h	2006-08-25 22:14:06 UTC (rev 3072)
@@ -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"); } }
 

Modified: trunk/numpy/oldnumeric/random_array.py
===================================================================
--- trunk/numpy/oldnumeric/random_array.py	2006-08-25 21:33:42 UTC (rev 3071)
+++ trunk/numpy/oldnumeric/random_array.py	2006-08-25 22:14:06 UTC (rev 3072)
@@ -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
 

Modified: trunk/numpy/oldnumeric/user_array.py
===================================================================
--- trunk/numpy/oldnumeric/user_array.py	2006-08-25 21:33:42 UTC (rev 3071)
+++ trunk/numpy/oldnumeric/user_array.py	2006-08-25 22:14:06 UTC (rev 3072)
@@ -4,6 +4,6 @@
 from numpy.lib.user_array import container as UserArray
 
 import numpy.oldnumeric as nold
-__all__ = nold.__all__
+__all__ = nold.__all__[:]
 __all__ += ['UserArray']
 del nold



More information about the Numpy-svn mailing list