Skip to content

Commit

Permalink
Add NumPy random function alias to aesara.tensor.random.basic
Browse files Browse the repository at this point in the history
  • Loading branch information
redbopo authored and brandonwillard committed Dec 15, 2022
1 parent 3418496 commit b48a6bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aesara/tensor/random/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2086,6 +2086,9 @@ def __call__(self, x, **kwargs):
permutation = PermutationRV()


random = uniform


__all__ = [
"permutation",
"choice",
Expand Down Expand Up @@ -2126,4 +2129,5 @@ def __call__(self, x, **kwargs):
"negative_binomial",
"gengamma",
"t",
"random",
]
5 changes: 5 additions & 0 deletions tests/tensor/random/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
permutation,
poisson,
randint,
random,
standard_normal,
t,
triangular,
Expand Down Expand Up @@ -303,6 +304,10 @@ def test_normal_default_args():
compare_sample_values(standard_normal)


def test_random_default_args():
compare_sample_values(random)


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

0 comments on commit b48a6bb

Please sign in to comment.