[PYTHON MATRIX-SIG] remind me
Konrad HINSEN
hinsenk@ERE.UMontreal.CA
Wed, 8 May 1996 16:37:20 -0400
> Is there a shorthand for:
>
> x2 = ravel(x)
> x2[n] = v
> x2.shape = x.shape
> x = x2
The way ravel() is implemented now, the first two lines
should be enough, i.e. they should change x.
My API proposal contains a feature that would allow
this to be written as
x[......][n] = v
I don't think you can get it much shorter...
-------------------------------------------------------------------------------
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
=================