[Numpy-discussion] New patch for new mgrid / ogrid functionality

Gael Varoquaux gael.varoquaux@normalesup....
Wed Sep 24 05:35:48 CDT 2008

On Wed, Sep 24, 2008 at 09:57:13AM +0200, David Kaplan wrote:
> > > X = asarray( mgrid[ 0:4, 0:4, 0:4 ] )

> > Doesn't this force a data copy?

> I am not sure if this forces a copy (asarray shouldn't for arrays,
> unlike array, but I am not sure what it does for lists that can
> trivially become arrays), 

I cannot really see how avoiding a copy would be possible: the data is
not garantied to be organized in a structured between the different
arrays of the list. If there is a way to avoid a copy, then it means my
knowledge of numpy is really lacking.


More information about the Numpy-discussion mailing list