Importing linalg causes different outputs of multivariate_normal
sabrina-ar opened this issue · 1 comments
sabrina-ar commented
For some N the sample script results in different outputs depending on whether scipy.linalg is imported or not and whether running the script with the pycharm console or the terminal (numpy version 1.10.0, scipy version 0.17.1). Python version 2.7.
For N=1, 2, 3:
- Same outputs with pycharm console and terminal both for "import scipy.linalg" being turned on and commented out
For N=4, 5, 6, ...:
- if "import scipy.linalg" is turned off: running by pycharm console and terminal have same result
- if "import scipy.linalg" is turned on:
- running by pycharm console has different results compared to scipy.linalg not being imported
- running by terminal has also different results compared to scipy.linalg not being imported and also divergent to the outputs of the pycharm console
import sys
import numpy as np
import scipy
# import scipy.linalg
print np.__version__
print scipy.__version__
if __name__ == '__main__':
np.random.seed(10)
N = 4
cov = np.zeros((N, N))
cov[:] = .2
cov[range(N), range(N)] = 1.
print cov
print cov.shape
data_field = np.random.multivariate_normal(mean=np.zeros(N), cov=cov, size=3)
print data_field
sys.exit(0)
ilayn commented
Hi @sabrina-ar This the repository for SciPy website. You might want to open your issue in the code repository https://github.com/scipy/scipy/issues