[Numpy-discussion] A new matrix class

Keith Goodman kwgoodman@gmail....
Sun May 11 14:01:08 CDT 2008

The most basic, and the most contentious, design decision of a new
matrix class is matrix indexing. There seems to be two camps:

1. The matrix class should be more like the array class. In particular
x[0,:] should return a 1d array or a 1d array like object that
contains the orientation (row or column) as an attribute and x[0]
should return a 1d array. (Is x.sum(1) also a 1d array like object?)

2. A matrix is a matrix: all operations on a matrix, including
indexing, should return a matrix or a scalar.

Does that describe the two approaches to matrix indexing? Are there
other approaches?

More information about the Numpy-discussion mailing list