[Numpy-discussion] numpy.array(arr.flat) mutates arr if arr.flags.fortran: bug?

Travis Oliphant oliphant@enthought....
Thu Mar 25 22:05:40 CDT 2010

On Mar 24, 2010, at 2:13 PM, Zachary Pincus wrote:

> Hello,
> I assume it is a bug that calling numpy.array() on a flatiter of a
> fortran-strided array that owns its own data causes that array to be
> rearranged somehow?
> Not sure what happens with a fancier-strided array that also owns its
> own data (because I'm not sure how to create one of those in python).
> This is from the latest svn version (2.0.0.dev8302) but was also
> present in a previous version too.

Hmm..   Yeah, this doesn't seem right.

I'm not really sure what

array(a.flat) should return since a.flat is an iterator...

but what it's doing is not right.


More information about the NumPy-Discussion mailing list