[Numpy-discussion] buggy fortran array reshape ?

Pauli Virtanen pav@iki...
Wed Apr 22 14:23:16 CDT 2009


Wed, 22 Apr 2009 15:12:20 -0400, josef.pktd wrote:
> On Wed, Apr 22, 2009 at 2:37 PM, Pauli Virtanen <pav@iki.fi> wrote:
[clip]
>> If you want to ensure no-copy, assign to shape:
>>
>> a.shape = (6,)
[clip]
> Is the difference between assigning to the attribute and using the
> method call explained
> somewhere?

No.

But it certainly should be. The first place to fix is the attribute 
docstring which doesn't even mention it can be assigned to:

	http://docs.scipy.org/numpy/docs/numpy.ndarray.shape/

Similar review should be done to all attribute docstrings. Second, a 
separate more detailed discussion about memory layouts, views, etc. 
should be written.

-- 
Pauli Virtanen



More information about the Numpy-discussion mailing list