[SciPy-user] meshgrid

Bill Baxter wbaxter at gmail.com
Wed Jul 5 04:24:26 EDT 2006


Is that new? I don't have a meshgrid function in my scipy 0.4.9.

>>> from scipy import *
>>> meshgrid
Traceback (most recent call last):
  File "<input>", line 1, in ?
NameError: name 'meshgrid' is not defined
>>> import scipy
>>> scipy.__version__
'0.4.9'

mgrid works though:
    numpy.mgrid[-2:2:10j, -1:1:10j].

--bb

On 7/5/06, Nils Wagner <nwagner at iam.uni-stuttgart.de> wrote:
>
> Hi all,
>
> Is it intended that the shape of the input vectors xcoor, ycoor is
> modified ?
>
> from scipy import *
> xcoor=linspace(-2,2,10)
> ycoor=linspace(-1,1,10)
> print shape(xcoor)
> print shape(ycoor)
> X1,Y1 = meshgrid(xcoor,ycoor)
> print shape(xcoor)
> print shape(ycoor)
>
>
> Output
>
> (10,)
> (10,)
> (1, 10)
> (10, 1)
>
> Nils
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20060705/042919fb/attachment.html>


More information about the SciPy-User mailing list