[PYTHON MATRIX-SIG] Standard Numerical Library
Konrad Hinsen
hinsen@physik.rwth-aachen.de
Sun, 11 Aug 1996 14:54:23 +0200
Will 1D functions like the fft (and also 2D functions) work transparently
on arbitrary multidimensional arrays, along user-specified axes? This
should be easier to implement efficiently in C than later in Python.
That reminds me of the long discussion about function ranks a few
months ago. Basically, all functions that act on an array of fixed
rank (1 for 1D FFT, 2 for matrix inversion, etc.) should loop
over the remainining indices of higher-rank arrays. This approach
has proven to be very useful in J.
This also raises the question of which axis/axes these functions should
use by default. I find it counter-intuitive that most functions (but not
all!) default to axis=0 whereas addition, multiplication, etc., match the
last dimensions of arrays of different depths. Personally, I would prefer
axis=-1 by default (but there may be a reason against this), or
axis=(-2,-1) for 2D functions (matrix inversion, etc).
Again the J-style rank approach provides a single rule for sorting
out such things in a very nice way...
* (Generalised) Cholesky decomposition of symmetric matrices would be very
useful to anybody dealing with covariance matrices (and I believe it is in
LINPACK, don't know about LAPACK).
It's also in LAPACK (everything that is in LINPACK is also in LAPACK,
which was designed as a replacement for LINPACK and EISPACK).
* Least-squares solution of over/under-determined systems of linear
equations a la A\b in Matlab.
I agree that all teh features you mentiones are essential for serious
linear algebra work, but I am not sure if they are essential for a
*minimal* standard library. I need pseudoinverses almost daily, but
I also know that many people have never heard of them...
Konrad.
--
-------------------------------------------------------------------------------
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
=================