[Numpy-discussion] try to solve issue #2649 and revisit #473

huangkandiy at gmail.com huangkandiy at gmail.com
Wed Apr 3 19:11:10 EDT 2013


Agree with the row-vector and column-vector thing. I notice that in
ndarraymultiplication, 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 <
chris.barker at noaa.gov> wrote:

> On Wed, Apr 3, 2013 at 1:03 PM, Alan G Isaac <alan.isaac at gmail.com> wrote:
> > On 4/3/2013 3:18 PM, huangkandiy at gmail.com 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
>
> Chris.Barker at noaa.gov
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
Kan Huang
Department of Applied math & Statistics
Stony Brook University
917-767-8018
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130403/603a72d2/attachment.html>


More information about the NumPy-Discussion mailing list