[SciPy-user] new scipy and __future__ division?

Travis Oliphant oliphant at ee.byu.edu
Sat Oct 22 12:48:18 CDT 2005

Andrew Jaffe wrote:

>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
>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
Yes, this is a bug.

Could you please post a small snippet of code that produces the problem 
on your computer. My simple tests don't reproduce it.

Please print


for comparison purposes as well.



More information about the SciPy-user mailing list