scipy/scipy — pull request #378 by seberg (2012-12-10 15:46:58+00:00)
Title: FIX: Do not rely on strides for contiguous arrays in signal.medfilt

When an array is contiguous in memory but has shape[dim] == 1, then
its strides[dim] is not really used, so it can be considered arbitrary
even if the array is contiguous. This is generally true for 0-sized arrays.

Even without a change in numpy, this code (at least with numpy <1.8.)
could segfault for one dimensional arrays with one element.

---

This fixes build problems with current numpy master (even if it is probably going to be changed in numpy any time). This was already previously buggy in corner cases for older numpy, so I think it should be changed here anyway, also I would prefere if the assumption of `strides[-1] == itemsize` is just generally not used, for the future, so that maybe the contiguous flags can be set in a better way in the future.