numpy/numpy — pull request #2950 by seberg (2013-01-24 22:09:55+00:00)
Title: BUG: Fix strides of trailing 1s when reshaping

When adding ones to the shape for non contiguous arrays reshapes
(i.e. either the first array is not contiguous or the the reshape
order does not match it). The strides of trailing ones were not
set. For example reshape of (6,) to (6,1,1). Previously this occured
rarely because of removed special handleing when only ones were
added or removed.

--

Fix for gh-2949, this does not attempt to set strides in a beautiful way to conserve the contiguity of the input array, but that is maybe a bigger matter anyway (and here only interesting in corner cases I guess).