[Numpy-discussion] .T Transpose shortcut for arrays again
Robert Kern
robert.kern at gmail.com
Thu Jul 6 23:23:06 CDT 2006
Bill Baxter wrote:
> On 7/7/06, *Robert Kern* <robert.kern at gmail.com
> <mailto:robert.kern at gmail.com>> wrote:
>
> Bill Baxter wrote:
> > Robert Kern wrote:
[snip]
> > 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.
>
> My argument is not that "it's convenient for what I do", it's that "it's
> convenient for what 90% of users want to do". But unfortunately I can't
> think of a good way to back up that claim with any sort of numbers.
[snip]
> I am also curious, given the number of times I've heard this nebulous
> argument of "there are lots kinds of numerical computing that don't
> invlolve linear algebra", that no one ever seems to name any of these
> "lots of kinds". Statistics, maybe? But you can find lots of linear
> algebra in statistics.
That's because I'm not waving my hands at general fields of application. I'm
talking about how people actually use array objects on a line-by-line basis. If
I represent a dataset as an array and fit a nonlinear function to that dataset,
am I using linear algebra at some level? Sure! Does having a .T attribute on
that array help me at all? No. Arguing about how fundamental linear algebra is
to numerical endeavors is entirely besides the point.
I'm not saying that people who do use arrays for linear algebra are rare or
unimportant. It's that syntactical convenience for one set of conventional ways
to use an array object, by itself, is not a good enough reason to add stuff to
the core array object.
--
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