Skip to content

Commit

Permalink
Add tests for samples
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Oct 20, 2020
1 parent 55b18c3 commit 2490342
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_probability.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def test_poisson(backend):
)
assert result.shape == (1, 2)

sample = probability.Poisson(tb.astensor([10.0, 10.0])).sample((10,))
assert sample.shape == (10, 2)


def test_normal(backend):
tb, _ = backend
Expand All @@ -43,6 +46,9 @@ def test_normal(backend):
).log_prob(tb.astensor([[2.0, 3.0]]))
assert result.shape == (1, 2)

sample = probability.Poisson(tb.astensor([10.0, 10.0])).sample((10,))
assert sample.shape == (10, 2)


def test_joint(backend):
tb, _ = backend
Expand Down

0 comments on commit 2490342

Please sign in to comment.