[Numpy-discussion] nasty bug in 1.8.0??

Jim Bosch talljimbo at gmail.com
Mon Dec 2 18:15:50 EST 2013


> 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.  I think that means the bug is ndarray's (indeed,
it's probably the kind of bug this new behavior was intended to catch, as I
should be handling the case of non-itemsize-multiple strides more
gracefully even when size > 1), and I'm working on a fix for it there now.

Thanks, Neil, for bringing this to my attention, and to all the NumPy dev's
for help in explaining what's going on.

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131202/18aab7e6/attachment.html>


More information about the NumPy-Discussion mailing list