Skip to content

Commit f4fc6c0

Browse files
redbopobrandonwillard
authored andcommitted
Add NumPy random function alias to aesara.tensor.random.basic
1 parent 5b165ea commit f4fc6c0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

aesara/tensor/random/basic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2086,6 +2086,9 @@ def __call__(self, x, **kwargs):
20862086
permutation = PermutationRV()
20872087

20882088

2089+
random = uniform
2090+
2091+
20892092
__all__ = [
20902093
"permutation",
20912094
"choice",
@@ -2126,4 +2129,5 @@ def __call__(self, x, **kwargs):
21262129
"negative_binomial",
21272130
"gengamma",
21282131
"t",
2132+
"random",
21292133
]

tests/tensor/random/test_basic.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
permutation,
4848
poisson,
4949
randint,
50+
random,
5051
standard_normal,
5152
t,
5253
triangular,
@@ -303,6 +304,10 @@ def test_normal_default_args():
303304
compare_sample_values(standard_normal)
304305

305306

307+
def test_random_default_args():
308+
compare_sample_values(random)
309+
310+
306311
@pytest.mark.parametrize(
307312
"mean, sigma, size",
308313
[

0 commit comments

Comments
 (0)