Do not assume anything on the stride when dimension is 1

Also set the Python exception if an error is met.
Just comment why you special case 1. Otherwise, I'm good to merge when tests pass.