diff options
author | Seth Troisi <sethtroisi@google.com> | 2020-01-03 13:44:22 -0800 |
---|---|---|
committer | Seth Troisi <sethtroisi@google.com> | 2020-01-03 13:44:22 -0800 |
commit | 24189be60ec4d823f4068be727b5d28f7eacc823 (patch) | |
tree | 721707dce400a3cee2eea8f98e3d579ea904c367 /tools/swig/numpy.i | |
parent | e1aecb08f99321b72959cc50eb7b47454b613f52 (diff) | |
download | numpy-24189be60ec4d823f4068be727b5d28f7eacc823.tar.gz |
Cleaning up PY_MAJOR_VERSION/PY_VERSION_HEX
Diffstat (limited to 'tools/swig/numpy.i')
-rw-r--r-- | tools/swig/numpy.i | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/swig/numpy.i b/tools/swig/numpy.i index 36bb55c98..8416e82f3 100644 --- a/tools/swig/numpy.i +++ b/tools/swig/numpy.i @@ -120,11 +120,6 @@ if (PyDict_Check( py_obj)) return "dict" ; if (PyList_Check( py_obj)) return "list" ; if (PyTuple_Check( py_obj)) return "tuple" ; -%#if PY_MAJOR_VERSION < 3 - if (PyFile_Check( py_obj)) return "file" ; - if (PyModule_Check( py_obj)) return "module" ; - if (PyInstance_Check(py_obj)) return "instance" ; -%#endif return "unknown type"; } @@ -545,7 +540,7 @@ const npy_intp *dims = array_dimensions(ary); for (i=0; i < nd; ++i) n_non_one += (dims[i] != 1) ? 1 : 0; - if (n_non_one > 1) + if (n_non_one > 1) array_clearflags(ary,NPY_ARRAY_CARRAY); array_enableflags(ary,NPY_ARRAY_FARRAY); /* Recompute the strides */ |