diff options
| author | juztamau5 <juztamau5@gmail.com> | 2022-11-07 09:24:23 -0800 |
|---|---|---|
| committer | juztamau5 <juztamau5@gmail.com> | 2022-11-07 21:23:27 -0800 |
| commit | bff98532030d2f8a9af070f5f9210d174621d1e0 (patch) | |
| tree | 0d656fe6e60591a6fddc351e230a2a7ff76f6fba /numpy | |
| parent | 28e9227565b22d2309825b58cb8fa8a45af011d9 (diff) | |
| download | numpy-bff98532030d2f8a9af070f5f9210d174621d1e0.tar.gz | |
Fix conversion from bool to enum
Error was:
ndarraytypes.h:1503:75: error: cannot convert 'bool' to 'NPY_ORDER' in assignment
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/src/multiarray/convert.c | 2 | ||||
| -rw-r--r-- | numpy/core/src/multiarray/shape.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/convert.c b/numpy/core/src/multiarray/convert.c index 2aed0bbb4..092a17c89 100644 --- a/numpy/core/src/multiarray/convert.c +++ b/numpy/core/src/multiarray/convert.c @@ -305,7 +305,7 @@ PyArray_ToString(PyArrayObject *self, NPY_ORDER order) PyArrayIterObject *it; if (order == NPY_ANYORDER) - order = PyArray_ISFORTRAN(self); + order = PyArray_ISFORTRAN(self) ? NPY_FORTRANORDER : NPY_CORDER; /* if (PyArray_TYPE(self) == NPY_OBJECT) { PyErr_SetString(PyExc_ValueError, "a string for the data" \ diff --git a/numpy/core/src/multiarray/shape.c b/numpy/core/src/multiarray/shape.c index 9d6afb155..dc7151a9b 100644 --- a/numpy/core/src/multiarray/shape.c +++ b/numpy/core/src/multiarray/shape.c @@ -211,7 +211,7 @@ PyArray_Newshape(PyArrayObject *self, PyArray_Dims *newdims, int flags; if (order == NPY_ANYORDER) { - order = PyArray_ISFORTRAN(self); + order = PyArray_ISFORTRAN(self) ? NPY_FORTRANORDER : NPY_CORDER; } else if (order == NPY_KEEPORDER) { PyErr_SetString(PyExc_ValueError, |
