Soeren Sonnenburg wrote:

I am realizing that this must have been why cvxopt switched away from numarray/numeric. There slicing/indexing and '*' work as I would have expected:

cvxopt uses it's own classes because they did not feel that a general purpose array was needed. They wanted to define a matrix class with sparse matrix and dense matrix sub-classes. In fact, cvxopt's matrix classes can not be used as ubiquitously as Numeric/numarray arrays. Everything is not a matrix. In fact, I would like to see more general linear algebra routines that allow people to more naturally deal with (for example) six-dimensional linear operators mapping from a three-dimensional space to a three-dimensional space. Currently, you are forced to perform an artificial row-scanning procedure just to interface with matrix libraries. Scipy can help with this kind of thing. I do not see cvxopt as a competing array implementation. At some point, hopefully cvxopt will be integrated with scipy. I am continually looking for feasible ways to make scipy more attractive to contributors. Everybody benefits when their is a standard infrastructure. For example, there are sparse matrices in SciPy. If cvxopt has better sparse matrix objects, I would love to use them. Hopefully, the array interface will assist on a more abstract scale so that memory re-use can occur for at least the dense cvxopt matrices.

It now seems very difficult for me to end up with a single numeric/matrix package that makes it into core python - which is at the

same time very sad.

Their are several issues here. But, yes a Matrix object will always be a separate object just as quaternions should be because they represent an interpretation to a memory block. In Numeric/numarray the focus is on generic multidimensional arrays. Therefore numeric operators must be element-by element. Note that Numeric does have a Matrix object that allows you to use '*' to represent matrix multiplication. It's only problem is that passing this object to a function usually returns an array again instead of a Matrix. -Travis