[Numpy-svn] r3070 - trunk/numpy/core/code_generators

numpy-svn at scipy.org numpy-svn at scipy.org
Fri Aug 25 15:52:41 CDT 2006


Author: oliphant
Date: 2006-08-25 15:52:39 -0500 (Fri, 25 Aug 2006)
New Revision: 3070

Modified:
   trunk/numpy/core/code_generators/generate_array_api.py
Log:
Revert import_array so that it doesn't return anything

Modified: trunk/numpy/core/code_generators/generate_array_api.py
===================================================================
--- trunk/numpy/core/code_generators/generate_array_api.py	2006-08-25 20:21:29 UTC (rev 3069)
+++ trunk/numpy/core/code_generators/generate_array_api.py	2006-08-25 20:52:39 UTC (rev 3070)
@@ -89,8 +89,14 @@
   return 0;
 }
 
-#define import_array() { if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return; } }
+#define import_array() { if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); } }
 
+#define import_array0() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return ; } }
+
+#define import_array1(ret) {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return ret; } }
+
+#define import_array2(msg, ret) {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, msg); return ret; } }
+
 #endif
 
 #endif



More information about the Numpy-svn mailing list