[Numpy-discussion] matrix default to column vector?
Charles R Harris
charlesr.harris@gmail....
Sat Jun 6 13:58:09 CDT 2009
On Sat, Jun 6, 2009 at 12:34 PM, Olivier Verdier <zelbier@gmail.com> wrote:
> I took that very seriously when you said that matrices were important to
> you. Far from me the idea of forbidding numpy users to use matrices.
> My point was the fact that newcomers are confused by the presence of both
> matrices and arrays. I think that there should be only one
> matrix/vector/tensor object in numpy. Therefore I would advocate the removal
> of matrices from numpy.
>
> *But* why not have matrices in a different component? Maybe as a part of
> scipy? or somewhere else? You would be more than welcome to use them
> anywhere. Note that I use components outside numpy for my teaching (scipy,
> sympy, mayavi, nosetest) and I don't have any problems with that.
>
> With my "argument" I endeavoured to explain the potential complications of
> using matrices instead of arrays when teaching. Perhaps the strongest
> argument against matrices is that you cannot use vectors. I've taught enough
> matlab courses to realise the pain that this represents for students. But I
> realise also that somebody else would have a different experience.
>
> Of course x.T*y should be a 1x1 matrix, this is not an anomaly, but it is
> confusing for students, because they expect a scalar. That is why I prefer
> to teach with dot. Then the relation matrix/vector/scalar is crystal clear.
>
How about the common expression
exp((v.t*A*v)/2)
do you expect a matrix exponential here? Or should the students write
exp(<v, A*v>/2)
where <...> is the inner product?
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090606/af947fd5/attachment.html
More information about the Numpy-discussion
mailing list