Skip to content
Snippets Groups Projects
Commit f2d3d92a authored by Matthew Johnson's avatar Matthew Johnson Committed by GitHub
Browse files

Merge pull request #33 from nfoti/fix-inv-wish-int-nu

ensure nu is int when sampling inverse wishart
parents 85267fb8 20db232f
No related branches found
No related tags found
No related merge requests found
......@@ -221,7 +221,7 @@ def sample_invwishart(S,nu):
chol = np.linalg.cholesky(S)
if (nu <= 81+n) and (nu == np.round(nu)):
x = np.random.randn(nu,n)
x = np.random.randn(int(nu),n)
else:
x = np.diag(np.sqrt(np.atleast_1d(stats.chi2.rvs(nu-np.arange(n)))))
x[np.triu_indices_from(x,1)] = np.random.randn(n*(n-1)//2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment