8000 1.7.x backport by certik · Pull Request #472 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

1.7.x backport #472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 1, 2012
Prev Previous commit
Next Next commit
Reset flags when Axes are removed. Array might now be 1D, or removed …
…axes of size 1 destroy contiguousity.
  • Loading branch information
seberg authored and certik committed Sep 30, 2012
commit 13c7efa8a2d239f021f04965c024147a30a5be3a
3 changes: 3 additions & 0 deletions numpy/core/src/multiarray/shape.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
0