[PYTHON MATRIX-SIG] Renaming and Constructors

Dave Forrest forrest@rose.rsoc.rockwell.com
Mon, 4 Dec 1995 13:25:11 -0600


     > From owner-matrix-sig@python.org Mon Dec  4 12:06 CST 1995
     > Date: Sun, 3 Dec 1995 11:59:56 -0500
     > From: hinsenk@ERE.UMontreal.CA (Hinsen Konrad)
[snip]
     > 
     > I strongly dislike the type-specific constructors (also used for
     > output). They should be IntegerMatrix, FloatMatrix, ComplexMatrix,
     > CharacterMatrix, and GeneralMatrix. Anyone is free to define shorter
     > names for efficient typing, if desired.
     > 
     > I even propose a more radical renaming. Many people associate "matrix"
     > with the 2D-matrices from linear algebra. So it would be better to
 
 Yes!, Yes we do!  (Some of us even thought that that was the reason
 for having a Matrix SIG)

     > call our general objects "arrays", and leave the name "matrix" for
     > linear-algebra type objects that are restricted to rank 2 and use *
     > for matrix multiplication.  They could be implemented in Python based
     > on arrays.

I thought that we had decided a while back to call it "Tensor" because
"Array" was a more general, computer-science concept.

[snip]
     > 2) Constructors
     > 
[snip]
     > I find it confusing to have to constructors with almost the same name
     > and almost the same function. I propose to have only one, of whatever
     > name, which behaves like matrix(). The reason is that many matrix
     > functions accept nested lists or tuples instead of matrix arguments,
     > e.g. matrix([2,3]) + [5,4] works. So does matrix([2,3]) +
     > matrix([5,4]), which is equivalent. But Matrix([2,3]) + [5,4] and
     > Matrix([2,3]) + Matrix([5,4]) are not equivalent (well, they are in
     > this simple exaple due to broadcasting, but not in general). So
     > matrix() can be considered a conversion function from lists and tuples
     > to arrays, which is needed anyway.

I agree.


David Forrest

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

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