# [PYTHON MATRIX-SIG] Let's get going

**Hinsen Konrad
**
hinsenk@ere.umontreal.ca

*Tue, 12 Sep 1995 15:56:30 -0400*

Consider m[i][j]. Since 2-d matrices are a collection of column
vectors, m[i] is the ith column. That is, we give the column index
Of course you could also say that 2-d matrices are a collection
of row vectors, which then give you the other interpretation.
Anyway, I agree that this is just an interpretation problem and
not serious, although users will have to be aware of how Python
matrices correspond to Fortran/C matrices.
I suppose that the routines could be made smart enough to sniff at the
first element and check for numeric, complex (objects with re and im
attributes), or string data and pick the default type accordingly.
Speaking of complex numbers: has it ever been considered to make
them built-in objects in Python? This would simplify the matrix
implementation, and also make the math functions behave more
reasonably (i.e. sqrt(-1.) would return i instead of causing
an exception). It can't be much work and would be very useful
for numerical work.
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsenk@ere.umontreal.ca
Departement de chimie | Tel.: +1-514-343-6111 ext. 3953
Universite de Montreal | Fax: +1-514-343-7586
C.P. 6128, succ. A | Deutsch/Esperanto/English/Nederlands/
Montreal (QC) H3C 3J7 | Francais (phase experimentale)
-------------------------------------------------------------------------------
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================