[SciPy-user] Matrix Arithmetic
Colin J. Williams
cjw at sympatico.ca
Fri Jul 18 09:53:57 EDT 2003
Travis Oliphant wrote:
> Numeric has a very nice matrix object called Matrix. This is why
> Zhu's MatPy has received little attention from SciPy.
>
> I'm not sure if Numarray has this Matrix object or not, but I think it
> should.
>
>
> Travis O.
Many thanks, I hadn't spotted this. It is just what I had in mind for
my example.
I will abandon my endeavours with the example.
There is a bit more to Matrix.py than the Numpy.pdf let's on.
Matrix.py
The Matrix.py python module defines a class Matrix which is a
subclass of UserArray. The only differences
between Matrix instances and UserArray instances is that the *
operator on Matrix performs a
matrix multiplication, as opposed to element-wise multiplication,
and that the power operator ** is disallowed
for Matrix instances.
numarray appears to rely on array functions to perform matrix
functions. There is
no equivalent of Matrix.py in Numeric.
A rewrite for numarray might use the class property to provide for
transpose, inverse etc.
Similarly, Matrix might become a sub-class of NumArray.
I would be glad to help with the transfer of Matrix to numarray. Please
let be know.
Colin W.
More information about the SciPy-User
mailing list