Skip to content

Commit

Permalink
seed longdouble test (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Sep 27, 2022
1 parent b206ebd commit 9b3a047
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/emcee/tests/integration/test_longdouble.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def test_longdouble_doesnt_crash_bug_312():
def log_prob(x, ivar):
return -0.5 * np.sum(ivar * x**2)

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

np.random.seed(0)
ndim, nwalkers = 1, 20
steps = 1000
p0 = sigma * np.random.randn(nwalkers, ndim).astype(np.longdouble) + mjd
Expand Down

0 comments on commit 9b3a047

Please sign in to comment.