[Numpy-discussion] strange behavior of numpy.random.multivariate_normal, ticket:1842

Pauli Virtanen pav at iki.fi
Thu Feb 16 04:44:40 EST 2012


Hi,

16.02.2012 06:09, josef.pktd at gmail.com kirjoitti:
[clip]
> numpy linalg.svd doesn't produce always the same results
> 
> running this gives two different answers,
> using scipy.linalg.svd I always get the same answer, which is one of
> the numpy answers
> (numpy random.multivariate_normal is collateral damage)

Are you using a Windows binary for Numpy compiled with the Intel
compilers, or maybe linked with Intel MKL?

If yes, one possibility is that the exact sequence of floating point
operations in SVD or some other step in the calculation depends on the
data alignment, which can affect rounding error.

See http://www.nccs.nasa.gov/images/FloatingPoint_consistency.pdf

That would explain why the pattern you see is quasi-deterministic. The
other explanation would be using uninitialized memory at some point, but
that seems quite unlikely.

-- 
Pauli Virtanen




More information about the NumPy-Discussion mailing list