Skip to content

Commit 407fd81

Browse files
committed
Get rid of scipy dependency by using numpy.
1 parent e9fc9c3 commit 407fd81

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

code/hmc/test_hmc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import numpy
2-
from scipy import linalg
32
import theano
43

54
from hmc import HMC_sampler
@@ -15,7 +14,7 @@ def sampler_on_nd_gaussian(sampler_cls, burnin, n_samples, dim=10):
1514
cov = numpy.array(rng.rand(dim, dim), dtype=theano.config.floatX)
1615
cov = (cov + cov.T) / 2.
1716
cov[numpy.arange(dim), numpy.arange(dim)] = 1.0
18-
cov_inv = linalg.inv(cov)
17+
cov_inv = numpy.linalg.inv(cov)
1918

2019
# Define energy function for a multi-variate Gaussian
2120
def gaussian_energy(x):

0 commit comments

Comments
 (0)