Skip to content

Commit

Permalink
Add type hint to RandomVariable.rng_fn
Browse files Browse the repository at this point in the history
  • Loading branch information
sujitpal authored and brandonwillard committed Oct 18, 2022
1 parent fb8224e commit 77df667
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aesara/tensor/random/op.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _supp_shape_from_params(self, dist_params, **kwargs):
"""
return default_supp_shape_from_params(self.ndim_supp, dist_params, **kwargs)

def rng_fn(self, rng, *args, **kwargs):
def rng_fn(self, rng, *args, **kwargs) -> Union[int, float, np.ndarray]:
"""Sample a numeric random variate."""
return getattr(rng, self.name)(*args, **kwargs)

Expand Down

0 comments on commit 77df667

Please sign in to comment.