[SciPy-user] AttributeError: 'numpy.ndarray' object has no attribute 'step'
Travis Oliphant
oliphant.travis at ieee.org
Thu Mar 16 09:12:40 CST 2006
Nils Wagner wrote:
>>>> X,Y = mgrid[linspace(-0.4,0.4,10),linspace(-0.4,0.4,10)]
>>>>
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/usr/lib64/python2.4/site-packages/numpy/lib/index_tricks.py",
> line 89, in __getitem__
> step = key[k].step
> AttributeError: 'numpy.ndarray' object has no attribute 'step'
>
mgrid doesn't take sequences it takes "slice notation"
mgrid[-0.4:0.4:10j, -0.4:0.4:10j]
should work
-Travis
More information about the SciPy-user
mailing list