May 30, 2006
10:26 a.m.
On Tue, 30 May 2006, Rick Muller wrote:
Is it possible to create arrays that run from, say -5:5, rather than 0:11?
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
import numpy as N x = N.arange(-5,6) x array([-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) y=N.arange(11) y-5 array([-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5])
hth, Alan Isaac