|Version 3 (modified by anonymous, 7 years ago)|
- Learning strides started by Sasha
After the discussions, Travis decided that allowing arrays with 0-strided arrays actually simplifies the code. 0-strided arrays can be a bit confusing especially when using ufuncs with output arguments that are 0-strided arrays. But, they behave consistently and understandably. If a user intentionally performs x.strides = 0, they should know what they are doing, but it shouldn't be disallowed.
The function PyArray?_CheckStrides is able to ensure that strides won't cause later memory accesses to fail given an available chunk of memory at relative position -offset to numbytes-offset (assuming the array data starts at 0).