Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with numpy v1.12.0 #32

Open
dafnevk opened this issue Feb 21, 2017 · 1 comment
Open

error with numpy v1.12.0 #32

dafnevk opened this issue Feb 21, 2017 · 1 comment

Comments

@dafnevk
Copy link

dafnevk commented Feb 21, 2017

With the newest version of numpy (v1.12.0) I get the following error when running the tests (and also when using pybasicbayes with the pyhsmm package):

======================================================================
ERROR: test_gaussian.TestGaussian.test_empirical_bayes

Traceback (most recent call last):
File "/home/dafne/anaconda2/envs/ucltest/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/dafne/timeseries/pybasicbayes/tests/test_gaussian.py", line 46, in test_empirical_bayes
distributions.Gaussian().empirical_bayes(data).hypparams
File "/home/dafne/timeseries/pybasicbayes/pybasicbayes/distributions/gaussian.py", line 250, in empirical_bayes
self.resample() # intialize from prior given new hyperparameters
File "/home/dafne/timeseries/pybasicbayes/pybasicbayes/distributions/gaussian.py", line 271, in resample
self.natural_hypparam + self._get_statistics(data,D)))
File "/home/dafne/timeseries/pybasicbayes/pybasicbayes/util/stats.py", line 210, in sample_niw
lmbda = sample_invwishart(lmbda,nu)
File "/home/dafne/timeseries/pybasicbayes/pybasicbayes/util/stats.py", line 224, in sample_invwishart
x = np.random.randn(nu,n)
File "mtrand.pyx", line 1404, in mtrand.RandomState.randn (numpy/random/mtrand/mtrand.c:19843)
File "mtrand.pyx", line 1534, in mtrand.RandomState.standard_normal (numpy/random/mtrand/mtrand.c:20368)
File "mtrand.pyx", line 167, in mtrand.cont0_array (numpy/random/mtrand/mtrand.c:6127)
TypeError: 'numpy.float64' object cannot be interpreted as an index

@r-shruthi11
Copy link

Hi @dafnevk have you been able to find a resolution to this issue? I'm having the same problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants