[SciPy-user] new scipy and __future__ division?

Andrew Jaffe a.h.jaffe at gmail.com
Sat Oct 22 07:39:29 EDT 2005


Hi All-

I regularly use 'from __future__ import division' in my code, since I
can never be sure that my floats don't come to me looking like
integers.

However, scipy seems to have a problem with this: when I try to divide
a float64 scipy array by a float, I get errors like

TypeError: unsupported operand type(s) for /: 'scipy.ndarray' and 'float'

I don't know if this is a newly-introduced bug (it is a bug, right?),
since this is occuring in code that I've ported from numarray (where
this behavior did not occur), not Numeric.

Thanks,

Andrew




More information about the SciPy-User mailing list