[PYTHON MATRIX-SIG] Comments on 'a few thoughts'

Dave Forrest forrest@rose.rsoc.rockwell.com
Fri, 27 Oct 1995 09:38:07 -0500


     > From owner-matrix-sig@python.org Fri Oct 20 11:20 CDT 1995
[snip]
     > P. Dubois writes:
     > 
     > > 1. Usage of the matrix operators is perhaps 1% or less of the usage of
     > > the element-wise numbers. This is because when two-dimensional
     
 Not in my office.  Here, when we implemented a Matrix class in C++, we
 didn't even supply elementwise multiplication or _any_ division
 operator because _we_never_use_those_operations (well, we did
 implement division by a scalar - but that's it! :-).
 
 I made this plea once before but I'm going to make it again - please
 consider providing two interfaces into the matrix implementation - one
 that acts like a two-dimensional, linear-systems-type matrix and one
 that acts like a tensor.  Even in C you can have the same code
 underlying it (reuse is good).  I wouldn't try to deny you
 tensor-types the elementwise behaviour that you obviously need, but we
 need linear algebra - it's at the core of all our math models - please
 take this need seriously.
 
 
     > > matrices do arise, they usually represent the spatial or other type of
     > > discretization, far more often than they represent operators.  If I
     > > had it to do over again, I would not have special operators, just a
     > > function call, since the light usage is not worth the trouble. 
     > 
     > Wouldn't it be appropriate to make them methods instead of functions?

Absolutely - failing making them operators (as above) - methods are
definitely the way to go.  Actually, I think that that is what everyone
meant, it's just a matter of OO semantics.

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================