[Numpy-discussion] matrices in 1.1

Stéfan van der Walt stefan@sun.ac...
Fri Mar 21 10:35:09 CDT 2008


On Fri, Mar 21, 2008 at 3:23 PM, Alan G Isaac <aisaac@american.edu> wrote:
> On Fri, 21 Mar 2008, Nadav Horesh apparently wrote:
>  > I would like to see a unification of matrices and arrays.
>  > I often do calculation which involve both array processing
>  > and linear algebra, and the current solution of having
>  > function like dot and inv is not aesthetic. Switching
>  > between array and matrix types (or using .A attribute of
>  > a matrix) is not convinient either.
>
>
>  Use ``asmatrix``.  (Does not copy.)
>
>  After that the only needed "unification" I have
>  encountered is that iteration over a matrix should
>  return arrays (not matrices).  I believe this is
>  under consideration for 1.1.

The last I remember, we considered adding RowVector, ColumnVector and
letting slices out of a matrix either be one of those or a matrix
itself.  I simply don't see a Matrix as a container of ndarrays
(that's what ndarrays are for, right?).

Regards
Stéfan


More information about the Numpy-discussion mailing list