numpy/numpy — pull request #420 by seberg (2012-09-03 14:46:28+00:00)
Title: Reset flags when Axes are removed. Array might now be 1D, or removed axe...

This is related to Issue #387, and fixes half of it, the other half is that the strides are still 0 if keepdims=True is used, which means that the flags are unnecessarily False. For this, the strides have to be replaced if they are 0 (similar to what happens in shape.c -> PyArray_Newshape, with the code also related to Issue #380). I will probably add commits here related to this as well, or maybe someone who knows reduction.c well can see if those 0 strides cannot be set to something better easily?

One test for it would be (not sure where to put it, in test_regression?):
```python
def test_squeeze_contiguous():
"""#Issue 387 related"""
a = np.array([1,2,3]).reshape(3,1)
b = a.copy('F')

sa = a.squeeze()
sb = b.squeeze()

assert_(sa.flags.c_contiguous)
assert_(sb.flags.f_contiguous)
assert_(sa.flags.c_contiguous)
assert_(sb.flags.f_contiguous)
```