[Numpy-discussion] Call for a vote on .M .A .T .H attributes

Stefan van der Walt stefan at sun.ac.za
Fri Jul 7 10:06:57 EDT 2006


On Thu, Jul 06, 2006 at 10:26:12PM -0600, Travis Oliphant wrote:
> 1) .T  Have some kind of .T attribute

-1, since the expected behaviour of .T is different depending on
problem context.

>    a) .T == .swapaxes(-2,-1)

The fact that this was proposed just demonstrates the fact.  If you
have a (10,5) array, .T gives the expected (5,10) array.  But if you
have a (10,10,3) RGB image as an ndarray, .T gives a (10,3,10)
array... which is certainly not what you'd expect in an image
processing context.

Stéfan




More information about the NumPy-Discussion mailing list