summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2022-11-08 09:49:36 +0100
committerGitHub <noreply@github.com>2022-11-08 09:49:36 +0100
commit2c455b8f24f593ba305a0259fb4f2b03652049db (patch)
tree911fb71fa588d96051b63a486ec943c3b25d6981 /numpy
parent3a5d336c32c413f4739d6468d51e56969ca61f1e (diff)
parentbff98532030d2f8a9af070f5f9210d174621d1e0 (diff)
downloadnumpy-2c455b8f24f593ba305a0259fb4f2b03652049db.tar.gz
Merge pull request #22550 from juztamau5/fix-enum-bool
MAINT: Fix Fortran order flag use (using bool rather than enum)
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/convert.c2
-rw-r--r--numpy/core/src/multiarray/shape.c2
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,