Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/distributions/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,9 @@ def test_logp(self):
@pytest.mark.parametrize("explicit_shape", (True, False))
def test_batched_size(self, explicit_shape, batched_param):
steps, batch_size = 100, 5
param_val = np.square(np.random.randn(batch_size))
random_seed = 800
rng = np.random.default_rng(random_seed)
param_val = np.square(rng.random(batch_size))
init_kwargs = {
"omega": 1.25,
"alpha_1": 0.5,
Expand All @@ -801,7 +803,7 @@ def test_batched_size(self, explicit_shape, batched_param):
with Model() as t0:
y = GARCH11("y", **kwargs0)

y_eval = draw(y, draws=2, random_seed=800)
y_eval = draw(y, draws=2, random_seed=rng)
assert y_eval[0].shape == (batch_size, steps)
assert not np.any(np.isclose(y_eval[0], y_eval[1]))

Expand Down
Loading