[Numpy-discussion] bug in negative stride indexing for empty arrays
eric at enthought.com
Sat Jun 1 13:20:42 CDT 2002
I just ran across a situation where reversing an empty array using a negative
stride populates it with a new element. I'm betting this isn't the intended
An example code snippet is below.
Python 2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> from Numeric import *
>>> import Numeric
>>> a = array(())
>>> b = a[::-1]
Eric Jones <eric at enthought.com>
Enthought, Inc. [www.enthought.com and www.scipy.org]
More information about the Numpy-discussion