Be more resistent to NumPy bad strides.
Merge pull request #2008 from nouiz/numpy_strides

[CRASH] Be more resistent to NumPy bad strides for shapes of 1.