[SciPy-user] newbie: easy question (I hope)
Mon Feb 5 13:25:49 CST 2007
>From: Travis Oliphant <firstname.lastname@example.org>
>Reply-To: SciPy Users List <email@example.com>
>To: SciPy Users List <firstname.lastname@example.org>
>Subject: Re: [SciPy-user] newbie: easy question (I hope)
>Date: Mon, 05 Feb 2007 12:20:59 -0700
>Chiara Caronna wrote:
> >I have an old code, where I used numarray, and there is this command:
> >where c is a 1d array
> >c= unpack(format, string)
> >if I use array from numpy I got this error:
> >"shape is an invalid keyword argument for this function"
> >I need to transform c in an array of shape [nrows,ncol], how can I do it
> >with numpy?
>What exactly are you asking?
>If you want to use numarray-compatibile syntax then use the
>numpy.numarray module like this
>import numpy.numarray as N
>This is a compatibility-layer and is not recommended except for porting
>Otherwise you change the shape of an array using the reshape method or
>setting the shape attribute of an ndarray.
Actually I wanted to remove all the numarray syntax from my code... they are
not so much and I prefer to have a "cleaner" code.
I used the reshape method, thanks
>SciPy-user mailing list
Express yourself instantly with MSN Messenger! Download today it's FREE!
More information about the SciPy-user