[Numpy-discussion] untenable matrix behavior in SVN
Bruce Southey
bsouthey@gmail....
Tue Apr 29 15:14:41 CDT 2008
Hi,
On Tue, Apr 29, 2008 at 2:22 PM, Timothy Hochberg <tim.hochberg@ieee.org> wrote:
>
> Let me throw out a couple of more thoughts:
>
> First, there seems to be disagreement about what a row_vector and
> column_vector are (and even if they are sensible concepts, but let's leave
> that aside for moment). One school of thought is that they are
> one-dimensional objects that have some orientation (hence row/column). They
> correspond, more or less, to covariant and contravariant tensors, although I
> can never recall which is which. The second view, which I suspect is
> influenced by MatLab and its ilk, is that they are 2-dimensional 1xN and
> Nx1 arrays. It's my view that the pseudo tensor approach is more powerful,
> but it does require some metainformation be added to the array. This
> metadata can either take the form of making the different objects different
> classes, which leads to the matrix/row/column formulation, or adding some
> sort of tag to the array object (proposal #5, which so far lacks any
> detail).
>
Actually I think that this simply stems from the different variants of
linear (and more specifically matrix) algebra. My background is very
heavy in the statistical favor of this (what the heck are tensors...
http://mathworld.wolfram.com/Tensor.html). It is also clear (from that
definition) that others are from more physics and engineering
backgrounds. Hence all the back and forth because people have slightly
different usage, terminology and expectations.
The ability to treat vectors as matrices would be sufficient for my
needs because these are almost always used in the context of
vector-matrix multiplication. There is no additional benefit from
having row or column shapes or metadata because the row/column nature
is usually predetermined and would be represented by the shape of the
corresponding matrix. It really would be annoying to find that for an
n by 1 vector/matrix, the product of X.T*X is a scalar or an error
rather than an n by n matrix. Or requires additional code to get the
desired effect.
Regards
Bruce
More information about the Numpy-discussion
mailing list