I agree. It would be a good idea to have matrices out of numpy as a standalone package. Indeed, having matrices in the numpy core comes at a pedagogical cost. Newcomers (as I once was) do not know which to use. Matrix or array? It turns out that the vast majority of numpy/scipy modules use arrays, so arrays is the preferred way to go.
It would thus be clearer to have arrays in numpy and matrices available as an external package. Besides, I think matrices can be pretty tricky when used for teaching. For instance, you have to explain that all the operators work component-wise, except the multiplication! Another caveat is that since matrices are always 2x2, the "scalar product" of two column vectors computed as " x.T * y" will not be a scalar, but a 2x2 matrix. There is also the fact that you must cast all your vectors to column/raw matrices (as in matlab). For all these reasons, I prefer to use arrays and dot for teaching, and I have never had any complaints. == Olivier 2009/6/4 Tommy Grav <tg...@mac.com> > > On Jun 4, 2009, at 5:41 PM, Alan G Isaac wrote: > > On 6/4/2009 5:27 PM Tommy Grav apparently wrote: > >> Or the core development team split the matrices out of numpy and > >> make it > >> as separate package that the people that use them could pick up and > >> run with. > > > > > > This too would be a mistake, I believe. > > But it depends on whether a goal is to > > have more people use NumPy. I believe > > the community will gain from growth. > > > > In sum, my argument is this: > > Keeping a matrix object in NumPy has substantial > > benefits in encouraging growth of the NumPy > > community, and as far as I can tell, it is > > imposing few costs. Therefore I think there is > > a very substantial burden on people who propose > > removing the matrix object to demonstrate > > just how the NumPy community will benefit from > > this change. > > This is a perfectly valid argument. I am actually quite happy with the > numpy package as it is (I work in astronomy), I was just pointing out > that if there are few of the core numpy people interested in maintaing > or upgrading the matrix class one solution might be to make it a > scipy-like package that easily can be installed on top of numpy, but > where the code base might be more accessible to those that are > interested in matrices, but feel that numpy is a daunting beast to > tackle. > Some sense of ownership of a matrixpy package might encourage more > people to contribute. > > Just an idea ;-) > Tommy > > _______________________________________________ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion >
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion