[Numpy-discussion] Non-deterministic floating point behavior in numpy 1.5.1 ?

Pauli Virtanen pav at iki.fi
Wed Jan 12 13:05:59 EST 2011

Wed, 12 Jan 2011 17:34:32 +0000, Grégory Guyomarc'h wrote:
>       y = (numpy.dot(m, x) - 13.90901663) * 1000.0 print y[0]
> Also, I could not reproduce it with older versions of numpy such as 1.3.
> Is this behavior expected ? Is there a way to make sure the results of a
> numpy floating point computations remains the same for multiple runs?

There are essentially no changes in the dot() routine since 1.3.0 in 
Numpy. The non-determinism is probably in the BLAS linear algebra library 
you have linked Numpy with. What platform are you using? (Windows? Linux? 
Where did you obtain Numpy binaries?)

What do you get if you replace `numpy.dot` with 
`numpy.core.multiarray.dot` (which does not use BLAS)?

There's another thread on a similar issue here:


Pauli Virtanen

More information about the NumPy-Discussion mailing list