diff options
author | wfspotz@sandia.gov <wfspotz@sandia.gov@localhost> | 2007-04-10 15:44:17 +0000 |
---|---|---|
committer | wfspotz@sandia.gov <wfspotz@sandia.gov@localhost> | 2007-04-10 15:44:17 +0000 |
commit | e50171fa5073425a1537c081eefd200b0cf1e4d2 (patch) | |
tree | 66bb4da330a50588e84d56f373fd1725093ab562 | |
parent | f2101eee48837abece457eb8deec39efd578c5b9 (diff) | |
download | numpy-e50171fa5073425a1537c081eefd200b0cf1e4d2.tar.gz |
Changed remaining ->nd struct accesses to use array_numdims() macro
-rw-r--r-- | numpy/doc/swig/numpy.i | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/doc/swig/numpy.i b/numpy/doc/swig/numpy.i index 6ad0abe76..a2a3d3571 100644 --- a/numpy/doc/swig/numpy.i +++ b/numpy/doc/swig/numpy.i @@ -690,7 +690,7 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) { || !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 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) { 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); } |