diff options
author | Chris Kerr <debdepba@dasganma.tk> | 2014-11-10 13:59:44 +0000 |
---|---|---|
committer | Chris Kerr <debdepba@dasganma.tk> | 2014-11-10 14:13:09 +0000 |
commit | c5463e8134d80e72d03d01d0e2427f47404b1c0b (patch) | |
tree | f519eb877991e7bed837ebcc8bc05a88e93f92a3 /numpy/f2py/rules.py | |
parent | e2e6bd8e69d0a88084d4370d4991451968b0af52 (diff) | |
download | numpy-c5463e8134d80e72d03d01d0e2427f47404b1c0b.tar.gz |
DEP: replaced arr->nd with PyArray_NDIM in C code generation scripts
Diffstat (limited to 'numpy/f2py/rules.py')
-rw-r--r-- | numpy/f2py/rules.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py index 4c186712c..06c3a3447 100644 --- a/numpy/f2py/rules.py +++ b/numpy/f2py/rules.py @@ -1027,7 +1027,7 @@ if (#varname#_capi==Py_None) { # \tif ((#varname#_capi != Py_None) && PyArray_Check(#varname#_capi) \\ # \t\t&& (#varname#_capi != (PyObject *)capi_#varname#_tmp)) { -# \t\tif (((PyArrayObject *)#varname#_capi)->nd != capi_#varname#_tmp->nd) { +# \t\tif (PyArray_NDIM((PyArrayObject *)#varname#_capi) != PyArray_NDIM(capi_#varname#_tmp)) { # \t\t\tif (#varname#_capi != capi_#varname#_tmp->base) # \t\t\t\tcopy_ND_array((PyArrayObject *)capi_#varname#_tmp->base,(PyArrayObject *)#varname#_capi); # \t\t} else @@ -1056,7 +1056,7 @@ if (#varname#_capi==Py_None) { """\ \t\tint *_i,capi_i=0; \t\tCFUNCSMESS(\"#name#: Initializing #varname#=#init#\\n\"); -\t\tif (initforcomb(capi_#varname#_tmp->dimensions,capi_#varname#_tmp->nd,1)) { +\t\tif (initforcomb(capi_#varname#_tmp->dimensions,PyArray_NDIM(capi_#varname#_tmp),1)) { \t\t\twhile ((_i = nextforcomb())) \t\t\t\t#varname#[capi_i++] = #init#; /* fortran way */ \t\t} else { |