On 03/04/2013 7:11 PM, [email protected] wrote:
Agree with the row-vector and column-vector thing. I notice that in ndarray multiplication, the 1-d array is treated as a column-vector. But in matrix multiplication, 1-d array is converted to a row-vector. So just match the 1-d array to a column-vector, the behavior of ndarray and matrix will be consistent. 


On Wed, Apr 3, 2013 at 6:59 PM, Chris Barker - NOAA Federal <[email protected]> wrote:
On Wed, Apr 3, 2013 at 1:03 PM, Alan G Isaac <[email protected]> wrote:
> On 4/3/2013 3:18 PM, [email protected] wrote:

> In my view, the result should be a 1d array,
> the same as I.A.dot(x).
>
> But the maintainers wanted operations with matrices to
> return matrices whenever possible.  So instead of
> returning x it returns np.matrix(x).

the matrix object is a fine idea, but the key problem is that it
provides a 2-d matrix,  but no concept of a 1-d vector. I think it
would all be a cleaner if there were a row-vector and column-vector
object to accompany matrix -- they things that naturally return a
vector could do so, You can't use a regular 1-d array because there is
no way to distinguish between a row or column version.

But as Alan sid, this was all hashed out a few years back -- a bunch
of great ideas, but no one to implement them.

The truth is that matrix has little value outside of teaching, so no
one with the skills to push it forward uses it themselves.


-Chris

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[email protected]
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion



--
Kan Huang
Department of Applied math & Statistics
Stony Brook University
917-767-8018




_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion
I wonder about the value of matrices stated above,  Perhaps the thing to do is to wean people away from all those darned dots,

Surely, it would be straightforward to sub-class of a matrix (Vec) as a vector (a column of values) there could be a second subclass (TVec) for a transposed vector (a row of values).
  Some sort of convention would be needed to treat the one dimensional array as a Vec or a TVec.

I like the simpler algebra of matrices/vectors.

Colin W.

_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to