From: Konrad H. <hi...@cn...> - 2002-03-07 09:11:36
|
"eric" <er...@en...> writes: > Matrix.Matrix objects. This attribute approach will work, but I > wonder if trying the "adding an operator to Python" approach one > more time would be worth while. At Python10 developer's day, Guido If it were only one operator, perhaps, although I might even give up on Python completely if starts to use Perlish notations like ~@!. But if you really want to have a short-hand syntax for the common matrix operations, you'd need multiplication, division (shorthand for multiplying by inverse), power, transpose and hermitian transpose. If you want to go the "operator way", the goal should rather be something like APL, with composite operators. Matrix multiplication would then be a special case of a reduction operator that uses multiplication and addition (in APL this is written as "+.x"). Note that I am *not* suggesting this, my opinion is still that matrices and arrays should be semantically different types. Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hi...@cn... Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- |