[Numpy-discussion] defmatrix.py
Colin J. Williams
cjw at sympatico.ca
Tue Mar 27 14:10:57 EDT 2007
Charles R Harris wrote:
>
>
> On 3/26/07, *Travis Oliphant* <oliphant at ee.byu.edu
> <mailto:oliphant at ee.byu.edu>> wrote:
>
> Charles R Harris wrote:
>
> >
> >
> > The rule 1-d is always a *row* vector only applies when
> converting
> > to a
> > matrix.
> >
> > In this case, the dot operator does not "convert to a matrix"
> but
> > uses
> > rules for operating with mixed 2-d and 1-d arrays inherited from
> > Numeric.
> >
> > I'm very hesitant to change those rules.
> >
> >
> > I wasn't suggesting that, just noticing that the rule was 1-d vector
> > on right is treated as a column vector by dot, which is why an
> > exception was raised in the posted case. If it is traditional for
> > matrix routines always treat is as a row vector, so be it.
>
> O.K . So, the problem is that when I defined matrix multiplication, I
> mistakenly believed that dot always interpreted 1-d arrays as row
> vectors which it is now clear it doesn't.
>
> I think this led to the issues.
>
> So, making dot always return arrays seems like the needed fix.
>
>
> Sounds good. Do you want to leave the matrix * operator as it now is?
I hope so. numarray used the row convention.
Colin W.
>
> Chuck
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
More information about the NumPy-Discussion
mailing list