[Numpy-discussion] Inplace reshape
Timothy Hochberg
tim.hochberg@ieee....
Mon Apr 23 12:20:43 CDT 2007
On 4/23/07, Gael Varoquaux <gael.varoquaux@normalesup.org> wrote:
>
> Hi,
>
> I thought I remembered there was a way to reshape in-place an array, but
> neither google, nor greping my mailbox brings anything out.
> Am I wrong, or is there indeed a way to reshape in-place an array ?
Just set the shape of the array:
somearray.shape = newshape
Should do the trick
regards,
-tim
Cheers,
>
> Gaël
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
--
//=][=\\
tim.hochberg@ieee.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070423/2593c419/attachment.html
More information about the Numpy-discussion
mailing list