[MATRIX-SIG] Weird bug
Konrad Hinsen
hinsen@ibs.ibs.fr
Mon, 1 Sep 1997 20:14:12 +0200
> Naive users are strongly discouraged from using the 3-argument numeric
> functions and it is exactly this sort of behavior that is behind these
> warnings. If you realize that 'a' and transpose(a) both point to the
> same region of memory this "bug" makes perfect sense. In fact, there's
> no alternative way of implementing things that would make this "bug" go
> away without making 3-argument numeric functions use a temporary array
> for storing their result, which would completely eliminate their
> usefulness.
Still there should never be a wrong resulr - either use a temporary array,
or raise an exception. I guess the three-argument form could easily raise
an error whenever the last argument shares data space with one of the
other two arrays without actually being the same arraay; that should
cover all critical cases.
--
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale | Fax: +33-4.76.88.54.94
41, av. des Martyrs | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France | Nederlands/Francais
-------------------------------------------------------------------------------
_______________
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________