Skip to content

Commit 9b3a047

Browse files
authored
seed longdouble test (#439)
1 parent b206ebd commit 9b3a047

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/emcee/tests/integration/test_longdouble.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ def test_longdouble_doesnt_crash_bug_312():
99
def log_prob(x, ivar):
1010
return -0.5 * np.sum(ivar * x**2)
1111

12+
np.random.seed(0)
1213
ndim, nwalkers = 5, 20
1314
ivar = 1.0 / np.random.rand(ndim).astype(np.longdouble)
1415
p0 = np.random.randn(nwalkers, ndim).astype(np.longdouble)
@@ -29,6 +30,7 @@ def log_prob(x):
2930
assert x.dtype == np.longdouble
3031
return -0.5 * np.sum(((x - mjd) / sigma) ** 2)
3132

33+
np.random.seed(0)
3234
ndim, nwalkers = 1, 20
3335
steps = 1000
3436
p0 = sigma * np.random.randn(nwalkers, ndim).astype(np.longdouble) + mjd

0 commit comments

Comments
 (0)