1 Jun
2002
1 Jun
'02
6:20 a.m.
Hi, 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 behavior. An example code snippet is below. eric C:\home\ej\wrk\chaco>python 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 Numeric.__version__ '21.0' a = array(()) a zeros((0,), 'l') len(a) 0 b = a[::-1] len(b) 1 b array([0])
-- Eric Jones <eric at enthought.com> Enthought, Inc. [www.enthought.com and www.scipy.org] (512) 536-1057