diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-04-25 23:13:10 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-04-25 23:13:10 +0000 |
commit | c1bfdfda3dbd4e2349f5313a2f5846f60d7ea7ed (patch) | |
tree | a17d587d45d8d9e574222c96ead9393515c40c51 /numpy/doc/swig/numpy.i | |
parent | 7e7f3837ab12568036c79ea9d05087fa147f1bbe (diff) | |
download | numpy-c1bfdfda3dbd4e2349f5313a2f5846f60d7ea7ed.tar.gz |
Fix issue #77
Diffstat (limited to 'numpy/doc/swig/numpy.i')
-rw-r--r-- | numpy/doc/swig/numpy.i | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/doc/swig/numpy.i b/numpy/doc/swig/numpy.i index 6f200d222..9e061a9a1 100644 --- a/numpy/doc/swig/numpy.i +++ b/numpy/doc/swig/numpy.i @@ -371,11 +371,12 @@ TYPEMAP_IN2(PyObject, PyArray_OBJECT) /* One dimensional input/output arrays */ %define TYPEMAP_INPLACE1(type,typecode) %typemap(in) (type* INPLACE_ARRAY1, int DIM1) (PyArrayObject* temp=NULL) { + int i; temp = obj_to_array_no_conversion($input,typecode); if (!temp || !require_contiguous(temp)) SWIG_fail; $1 = (type*) temp->data; $2 = 1; - for (int i=0; i<temp->nd; ++i) $2 *= temp->dimensions[i]; + for (i=0; i<temp->nd; ++i) $2 *= temp->dimensions[i]; } %enddef |