[Numpy-discussion] nasty bug in 1.8.0??
njs at pobox.com
Mon Dec 2 18:20:48 EST 2013
On Mon, Dec 2, 2013 at 3:15 PM, Jim Bosch <talljimbo at gmail.com> wrote:
>> If your arrays are contiguous, you don't really need the strides (use the
>> itemsize instead). How is ndarray broken by this?
> ndarray is broken by this change because it expects the stride to be a
> multiple of the itemsize (I think; I'm just looking at code here, as I
> haven't had time to build NumPy 1.8 yet to test this); it has a slightly
> more restricted model for what data can look like than NumPy has, and it's
> easier to always just look at the stride for all sizes rather than
> special-case for size=1.
Note that arrays in which any dimension is 0 (i.e., 0 total elements)
can also have arbitrary strides with no consequence.
Nathaniel J. Smith
Postdoctoral researcher - Informatics - University of Edinburgh
More information about the NumPy-Discussion