[PYTHON MATRIX-SIG] Something broken with __mul__?

tim@lassi.ece.uiuc.edu tim@lassi.ece.uiuc.edu
Fri, 18 Oct 1996 12:07:17 -0500


Jim Hugunin writes:

>This was the best compromise I could come up with after all of the many
>debates.  I don't think it's reasonable to have a long int multiplied by a
>32-bit float return a 32-bit float (which is usually what I want when doing
>this calculation).  As you say, it's not to hard to work around this
>problem by making the integer a float, ie.

Ooops. Scratch what I just said about it probably being a
typo. Sorry!!

> print b*3.
>
>I like this feature of having to think and add the decimal point because it
>makes clear that the array you are going to get back will contain doubles
>and not floats.

What if I want to use and array of floats without going to doubles
(because of space issues, say) ?

OK, nevermind, I can just use a single element float array to force
that behaviour.






-- 
	-tim

+--------------------------------------------------------------------+
| Tim Hochberg               Ultrahigh Speed Digital Electronics Lab |
| tim@lassi.ece.uiuc.edu              University of Illinois         |
| http://dogbert.ece.uiuc.edu/~tim         (217) 333-6014            |
+--------------------------------------------------------------------+

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================