summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Haldane <ealloc@gmail.com>2018-03-21 22:52:42 (GMT)
committerGitHub <noreply@github.com>2018-03-21 22:52:42 (GMT)
commit2085cc7ff48f5ba6bdf39c27d0182d6593905fe5 (patch)
tree9bc6b15e70efe806567e660a9935530997571a75
parentcfde48156ff9ca0502f375900079da96a1582fec (diff)
parentcba38fac3bcbf6a7f1558a8da0a79e2afbd2cffa (diff)
downloadpython-numpy-2085cc7ff48f5ba6bdf39c27d0182d6593905fe5.zip
python-numpy-2085cc7ff48f5ba6bdf39c27d0182d6593905fe5.tar.gz
python-numpy-2085cc7ff48f5ba6bdf39c27d0182d6593905fe5.tar.bz2
Merge pull request #10778 from mattip/master
BUG: test, fix for missing flags['WRITEBACKIFCOPY'] key
-rw-r--r--numpy/core/src/multiarray/flagsobject.c2
-rw-r--r--numpy/core/tests/test_multiarray.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/flagsobject.c b/numpy/core/src/multiarray/flagsobject.c
index d3dcc93..a78bedc 100644
--- a/numpy/core/src/multiarray/flagsobject.c
+++ b/numpy/core/src/multiarray/flagsobject.c
@@ -575,7 +575,7 @@ arrayflags_getitem(PyArrayFlagsObject *self, PyObject *ind)
return arrayflags_fortran_get(self);
}
break;
- case 14:
+ case 15:
if (strncmp(key, "WRITEBACKIFCOPY", n) == 0) {
return arrayflags_writebackifcopy_get(self);
}
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index 6050f30..9400722 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -105,8 +105,10 @@ class TestFlags(object):
assert_equal(self.a.flags.updateifcopy, False)
with assert_warns(DeprecationWarning):
assert_equal(self.a.flags['U'], False)
+ assert_equal(self.a.flags['UPDATEIFCOPY'], False)
assert_equal(self.a.flags.writebackifcopy, False)
assert_equal(self.a.flags['X'], False)
+ assert_equal(self.a.flags['WRITEBACKIFCOPY'], False)
def test_string_align(self):