[PYTHON MATRIX-SIG] Matrix multiplies and syntactic nits
P. Dubois
dubois@kristen.llnl.gov
Fri, 17 Nov 1995 09:43:42 -0800
Jim Hugunin wrote:
> The following are 2x3 matrices of integers.
> a) Matrix_i((1,2,3),(4,5,6))
> b) matrix([[1,2,3],[4,5,6]], 'i')
> Opinions on which you should get with str(M)?
I prefer Matrix_i. I would really prefer something explicit like IntegerMatrix,
CharacterMatrix, etc, with Matrix reserved as euphemism for RealMatrix or
as a "smart" constructor as I discussed before.
It turns out you just don't use this kind of constructor much anyway,
as most matrices are produced by array functions/operators, not literal lists.
In the particular case of python there is some history having to do with using
characters to represent popular types, so the present choice is reasonable
and I don't feel strongly about this.
"If it isn't an abbreviation, you don't have to remember which
abbreviation it is."
Paul
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================