[PYTHON MATRIX-SIG] Ranks of operators
Hinsen Konrad
hinsenk@ere.umontreal.ca
Tue, 31 Oct 1995 15:43:04 -0500
1) We need an object that can hold a basic mathematical function in a form
that it can be efficiently (nearly as fast as hand-coded C) applied to a
matrix of raw basic types (ints and floats).
Also to complex numbers...
Every basic object of type ofunc has the members "reduce", "outer",
"accumulate", ("inner"?). These members are themselves ofuncs, however,
they don't have the members given above.
OK. For "inner" I'd prefer a notation of the form
add.inner.multiply(a,b)
with the usual possibility of specifying ranks. It seems that this
requires an explicit list of all possible combinations of binary
functions somewhere, but for the built-in functions that list is
not too long. Another possibility would be to make the second
binary function an argument, i.e. add.inner(multiply,a,b), but I'd
rather not have functions as arguments.
I'm open to suggestions as to how the rank of inner product should be treated.
No different from other operations. The inner product imposes a
restriction on its arguments in that the dimension of the rank-1 cells
of the first argument must be equal to the dimension of the rank-1
frames of the second argument, but this doesn't affect the general
principle of applying ranks. If the arguments do not fit, an exception
should be raised.
Well, that's it for now. Let me know if this makes sense, or seems like a
bad idea.
It seems OK to me!
-------------------------------------------------------------------------------
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. Centre-Ville | 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
=================