diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2012-09-03 16:22:06 +0200 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2012-09-03 16:22:06 +0200 |
commit | e4bafb2a4a3c682aaec18cc184c6a95ee1a30c26 (patch) | |
tree | 8531fe6aef4fd654cc332efba98b1b78841a8279 /numpy | |
parent | cd9092aa71d23359b33e89d938c55fb14b9bf606 (diff) | |
download | numpy-e4bafb2a4a3c682aaec18cc184c6a95ee1a30c26.tar.gz |
Reset flags when Axes are removed. Array might now be 1D, or removed axes of size 1 destroy contiguousity.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/shape.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/shape.c b/numpy/core/src/multiarray/shape.c index 067232632..684d42713 100644 --- a/numpy/core/src/multiarray/shape.c +++ b/numpy/core/src/multiarray/shape.c @@ -1186,4 +1186,7 @@ PyArray_RemoveAxesInPlace(PyArrayObject *arr, npy_bool *flags) /* The final number of dimensions */ fa->nd = idim_out; + + /* Update contiguous flags */ + PyArray_UpdateFlags(arr, NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_F_CONTIGUOUS); } |