Skip to content

Commit

Permalink
Fix test bug, run precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanhmorris committed Sep 11, 2024
1 parent 0cf6406 commit def1cd5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions pyrenew/process/ar.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
from numpyro.contrib.control_flow import scan
from numpyro.infer.reparam import LocScaleReparam


from pyrenew.metaclass import RandomVariable
from pyrenew.process.iidrandomsequence import StandardNormalSequence


class ARProcess(RandomVariable):
Expand All @@ -26,7 +24,7 @@ def sample(
n: int,
autoreg: ArrayLike,
init_vals: ArrayLike,
noise_sd: float | ArrayLike
noise_sd: float | ArrayLike,
) -> ArrayLike:
"""
Sample from the AR process
Expand Down
2 changes: 1 addition & 1 deletion test/test_ar_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_ar_samples_correctly_distributed():
# check it regresses to mean
# when started away from it
long_ts = ar(
noise_name="arprocess_noise",
noise_name="arprocess_noise",
n=10000,
init_vals=ar_inits,
autoreg=jnp.array([0.75]),
Expand Down
1 change: 1 addition & 0 deletions test/test_iid_random_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def test_standard_normal_sequence(shape, n):

# should be sampleable
with numpyro.handlers.seed(rng_seed=67):
ans = norm_seq(n=n)

# samples should have shape (n,) + the element_rv sample shape
expected_sample_shape = (n,) + shape if shape is not None else (n,)
Expand Down

0 comments on commit def1cd5

Please sign in to comment.