summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-07-06 15:35:41 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-07-06 18:07:05 +0200
commit77d62bb551c1bfb4d475fa932b718660b6deadbd (patch)
tree521afe50980fd6f15838ced0900479af822b2050 /numpy/core/src
parent81242f627582e04c000b73e52bc9b4067b0f478d (diff)
downloadnumpy-77d62bb551c1bfb4d475fa932b718660b6deadbd.tar.gz
BUG: retain writeable flag when indexing subclasses
Diffstat (limited to 'numpy/core/src')
-rw-r--r--numpy/core/src/multiarray/mapping.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c
index e2b8ef700..87720e692 100644
--- a/numpy/core/src/multiarray/mapping.c
+++ b/numpy/core/src/multiarray/mapping.c
@@ -1058,6 +1058,9 @@ array_boolean_subscript(PyArrayObject *self,
Py_DECREF(ret);
return NULL;
}
+ if (_IsWriteable(ret)) {
+ PyArray_ENABLEFLAGS(ret, NPY_ARRAY_WRITEABLE);
+ }
}
return ret;
@@ -1583,6 +1586,9 @@ array_subscript(PyArrayObject *self, PyObject *op)
result = NULL;
goto finish;
}
+ if (_IsWriteable(result)) {
+ PyArray_ENABLEFLAGS(result, NPY_ARRAY_WRITEABLE);
+ }
}
finish: