[Numpy-discussion] buggy buggy bugyy: format and casting ?

Eric Emsellem emsellem at obs.univ-lyon1.fr
Fri Sep 15 11:49:09 CDT 2006


I am facing a rather frustrating problem with numpy/scipy: after
upgrading to svn numpy and scipy, and trying to remove most of the now
unnecessary casting (floats) the program I wrote does not give me the
right answer. It seems that the answer is somewhat scaled down (but not
in a simple way). I had this kind of behaviour some time ago when scipy
and numpy were not fully compatible and then I had to cast the floats
explicitely in my program to make it work. But now it SHOULD be fully
compatible as far as I understand the issue. So my question is:
is there any remaining flaws in terms of casts/format between scipy and
numpy? I am specifically using the scipy functions:
- special.erf, special.erfc, orthogonal.ps_roots, integrate.quad...
and the numpy functions : sum, sqrt, exp, sin, cos, arctan.
I am doing all the calculations using numpy.float32.

Did anybody witness weird behaviour recently in this context?
(I don't really know what to do now since I already spent hours trying
to find the problem: the point is that the final answer is wrong for
sure, but the intermediate calculations are not easily checked since I
do not know what to really expect there. The program was working before
I touched the casting + upgraded numpy/scipy)

thanks for any help here, and cheers.


More information about the Numpy-discussion mailing list