Skip to content

Commit

Permalink
Add tests for power and zipf RV
Browse files Browse the repository at this point in the history
  • Loading branch information
Smit-create authored and rlouf committed Feb 23, 2023
1 parent b5f4444 commit a6e447f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/tensor/random/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
pareto,
permutation,
poisson,
power,
randint,
random,
rayleigh,
Expand All @@ -57,6 +58,7 @@
vonmises,
wald,
weibull,
zipf,
)
from aesara.tensor.rewriting.shape import ShapeFeature
from aesara.tensor.type import iscalar, scalar, tensor
Expand Down Expand Up @@ -423,6 +425,28 @@ def test_rayleigh_default_args():
compare_sample_values(rayleigh)


@pytest.mark.parametrize(
"a, size",
[
(0.5, None),
(2.3, 1000),
],
)
def test_power_samples(a, size):
compare_sample_values(power, a, size=size)


@pytest.mark.parametrize(
"a, size",
[
(1.5, None),
(5.5, 1000),
],
)
def test_zipf_samples(a, size):
compare_sample_values(zipf, a, size=size)


@pytest.mark.parametrize(
"alpha, size",
[
Expand Down

0 comments on commit a6e447f

Please sign in to comment.