numpy/numpy — pull request #2696 by seberg (2012-10-23 10:59:52+00:00)
Title: BUG: Fix bug with size 1-dims in CreateSortedStridePerm

This changes CreateSortedStridedPerm to not use the shape for special casing 1-dim axis. The cleanup does not seem to be useful in most cases and the current way is buggy. Also insert stride so that reduce with keepdims=1 will keep contiguous arrays contiguous. "Closes Issue #434"

Sorry if a PR against 1.7. is the wrong thing at this point. But to me this seems the easiest way to avoid any headaches.