numpy/numpy — pull request #5266 by chebee7i (2014-11-10 19:33:08+00:00)
Title: Possible regression in `multivariate_normal()`

When generating numbers from `np.random.multivariate_normal`, I'm not getting the same numbers when moving from NumPy 1.8.2 to 1.9.1. This seems to happen only when the covariance matrix is not positive semi-definite, but note, the docs never stated this was a requirement to guarantee backwards compatibility.

Here is current behavior:
```
In [1]: np.random.seed(0)

In [2]: np.random.multivariate_normal([.5, .5], [[.3, .2],[.2, .4]])
Out[2]: array([-0.42923317, -0.44352946])

In [3]: np.random.multivariate_normal([.5, .5], [[.3, .5],[.5, .4]])
/Users/me/.virtualenvs/py27/bin/ipython:1: RuntimeWarning: covariance is not positive-semidefinite.
Out[3]: array([-0.10637043, -0.17003179])

In [4]: np.__version__
Out[4]: '1.9.1'
```

Here is behavior in 1.8.1 and also 1.8.2:
```
In [1]: np.random.seed(0)

In [2]: np.random.multivariate_normal([.5, .5], [[.3, .2],[.2, .4]])
Out[2]: array([-0.42923317, -0.44352946])

In [3]: np.random.multivariate_normal([.5, .5], [[.3, .5],[.5, .4]])
Out[3]: array([ 0.54245905, -0.7572144 ])

In [4]: np.__version__
Out[4]: '1.8.1'
```
Resetting the seed before `In [3]` doesn't affect the difference between versions.