Skip to content
Snippets Groups Projects
Commit 20db232f authored by Nick Foti's avatar Nick Foti
Browse files

ensure nu is int when sampling inverse wishart

parent 85267fb8
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