Skip to content

error with numpy v1.12.0 #32

@dafnevk

Description

@dafnevk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions