[PYTHON MATRIX-SIG] Type coercion two more times

Hinsen Konrad hinsenk@ere.umontreal.ca
Fri, 26 Jan 1996 11:26:38 -0500

   Ok, I'm starting to be convinced. My last hurdle to saying yes is
   having to explain the following to potential Python array users:
   >>> pi = omath.arctan(1.0)*4.0
   >>> m = Array_f([1.0,2.0,3.0])
   >>> m * pi
   Traceback (innermost last):
     File "<stdin>", line 1, in ?
   TypeError: inconsistant floating point types

It could be made a bit easier by changing the text of the
error message:
   TypeError: no automatic coercion between precisions

Yet I agree, this is not a desirable feature. It is just the most
acceptable among the evils we have to choose from.

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