[Numpy-svn] r3691 - trunk/numpy/doc/swig

numpy-svn@scip... numpy-svn@scip...
Tue Apr 10 10:44:20 CDT 2007


Author: wfspotz@sandia.gov
Date: 2007-04-10 10:44:17 -0500 (Tue, 10 Apr 2007)
New Revision: 3691

Modified:
   trunk/numpy/doc/swig/numpy.i
Log:
Changed remaining ->nd struct accesses to use array_numdims() macro

Modified: trunk/numpy/doc/swig/numpy.i
===================================================================
--- trunk/numpy/doc/swig/numpy.i	2007-04-10 15:21:28 UTC (rev 3690)
+++ trunk/numpy/doc/swig/numpy.i	2007-04-10 15:44:17 UTC (rev 3691)
@@ -690,7 +690,7 @@
       || !require_native(array)) SWIG_fail;
   $1 = (DATA_TYPE*) array_data(array);
   $2 = 1;
-  for (int i=0; i<array->nd; ++i) $2 *= array_size(array,i);
+  for (int i=0; i < array_numdims(array); ++i) $2 *= array_size(array,i);
 }
 
 /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1)
@@ -708,7 +708,7 @@
   if (!array || !require_dimensions(array,1) || !require_contiguous(array)
       || !require_native(array)) SWIG_fail;
   $1 = 1;
-  for (int i=0; i<array->nd; ++i) $1 *= array_size(array,i);
+  for (int i=0; i < array_numdims(array); ++i) $1 *= array_size(array,i);
   $2 = (DATA_TYPE*) array_data(array);
 }
 



More information about the Numpy-svn mailing list