[Numpy-svn] r5430 - trunk/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Wed Jul 16 00:39:03 CDT 2008


Author: charris
Date: 2008-07-16 00:38:55 -0500 (Wed, 16 Jul 2008)
New Revision: 5430

Modified:
   trunk/numpy/core/src/multiarraymodule.c
Log:
Deprecate PyArray_As2D.


Modified: trunk/numpy/core/src/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarraymodule.c	2008-07-16 03:33:12 UTC (rev 5429)
+++ trunk/numpy/core/src/multiarraymodule.c	2008-07-16 05:38:55 UTC (rev 5430)
@@ -1685,7 +1685,11 @@
 {
     intp newdims[2];
     PyArray_Descr *descr;
+    char msg[] = "PyArray_As1D: use PyArray_AsCArray.";
 
+    if (DEPRECATE(msg) < 0) {
+        return -1;
+    }
     descr = PyArray_DescrFromType(typecode);
     if (PyArray_AsCArray(op, (void *)ptr, newdims, 2, descr) == -1)
         return -1;



More information about the Numpy-svn mailing list