[Scipy-svn] r4956 - trunk/scipy/io

scipy-svn@scip... scipy-svn@scip...
Mon Nov 3 01:30:47 CST 2008


Author: chris.burns
Date: 2008-11-03 01:30:45 -0600 (Mon, 03 Nov 2008)
New Revision: 4956

Modified:
   trunk/scipy/io/numpyiomodule.c
Log:
Changed FromDims to SimpleNew, author paul.ivanov.

Modified: trunk/scipy/io/numpyiomodule.c
===================================================================
--- trunk/scipy/io/numpyiomodule.c	2008-11-03 07:29:50 UTC (rev 4955)
+++ trunk/scipy/io/numpyiomodule.c	2008-11-03 07:30:45 UTC (rev 4956)
@@ -101,7 +101,7 @@
   }
   /* Make a 1-D NumPy array of type read_type with n elements */ 
 
-  if ((arr = (PyArrayObject *)PyArray_FromDims(1,(int*)&n,out_type)) == NULL)
+  if ((arr = (PyArrayObject *)PyArray_SimpleNew(1,(npy_intp*)&n,out_type)) == NULL)
     return NULL;
 
   if (arr->descr->elsize == 0) {
@@ -423,7 +423,7 @@
 
   out_size = (PyArray_SIZE(arr)/els_per_slice)*ceil ( (float) els_per_slice / 8);
 
-  if ((out = (PyArrayObject *)PyArray_FromDims(1,&out_size,PyArray_UBYTE))==NULL) {
+  if ((out = (PyArrayObject *)PyArray_SimpleNew(1,&out_size,PyArray_UBYTE))==NULL) {
       goto fail;
   }
   
@@ -469,7 +469,7 @@
 
   out_size = els_per_slice * arrsize / ceil( (float) els_per_slice / 8);
 
-  if ((out = (PyArrayObject *)PyArray_FromDims(1,&out_size,out_type))==NULL)
+  if ((out = (PyArrayObject *)PyArray_SimpleNew(1,&out_size,out_type))==NULL)
       goto fail;
 
   if (out->descr->type_num > PyArray_LONG) {



More information about the Scipy-svn mailing list