[SciPy-user] AttributeError: 'numpy.ndarray' object has no attribute 'step'

Nils Wagner nwagner at mecha.uni-stuttgart.de
Thu Mar 16 04:36:23 CST 2006


Arnd Baecker wrote:
> On Thu, 16 Mar 2006, Nils Wagner wrote:
>
>   
>> Hi all,
>>
>> linspace is useful for one-dimensional objects.
>> Is there something similar for surfaces ?
>> I would like to build a uniform mesh on a cube (-R,R)^3
>> I mean collocation points uniformly distributed on each side of the cube.
>>     
>
> What about numpy.mgrid?
>
> Arnd
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>   

I tried

>>> 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'

Nils

 




More information about the SciPy-user mailing list