[Numpy-discussion] .T Transpose shortcut for arrays again

Robert Kern robert.kern at gmail.com
Thu Jul 6 22:31:07 EDT 2006


Bill Baxter wrote:
> Robert Kern wrote:
> 
>     Like Sasha, I'm mildly opposed to .T (as a synonym for .transpose())
>     and much
>     more opposed to the rest (including .T being a synonym for
>     .swapaxes(-2, -1)).
>     It's not often that a proposal carries with it its own
>     slippery-slope argument
>     against itself.
> 
> The slippery slope argument only applies to the .M, not the .T or .H.  

No, it was the "Let's have a .T attribute. And if we're going to do that, then 
we should also do this. And this. And this."

>     I don't think that just because arrays are often used for linear
>     algebra that
> 
>     linear algebra assumptions should be built in to the core array type.
> 
> It's not just that "arrays can be used for linear algebra".  It's that 
> linear algebra is the single most popular kind of numerical computing in 
> the world!  It's the foundation for a countless many fields.   What 
> you're saying is like "grocery stores shouldn't devote so much shelf 
> space to food, because food is just one of the products people buy", or
[etc.]

I'm sorry, but the argument-by-inappropriate-analogy is not convincing. Just 
because linear algebra is "the base" for a lot of numerical computing does not 
mean that everyone is using numpy arrays for linear algebra all the time. Much 
less does it mean that all of those conventions you've devised should be shoved 
into the core array type. I hold a higher standard for the design of the core 
array type than I do for the stuff around it. "It's convenient for what I do," 
just doesn't rise to that level. There has to be more of an argument for it.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco





More information about the NumPy-Discussion mailing list