Skip to content

Commit

Permalink
Distrax: Enable Categorical to be used with a single element.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 390374075
  • Loading branch information
DistraxDev authored and DistraxDev committed Aug 12, 2021
1 parent 941bb83 commit 272ccb8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions distrax/_src/distributions/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ def __init__(self,
"""
super().__init__()
chex.assert_exactly_one_is_none(probs, logits)
chex.if_args_not_none(chex.assert_axis_dimension_gt, probs, axis=-1, val=1)
chex.if_args_not_none(chex.assert_axis_dimension_gt, logits, axis=-1, val=1)
if not (jnp.issubdtype(dtype, jnp.integer) or
jnp.issubdtype(dtype, jnp.floating)):
raise ValueError(
Expand Down

0 comments on commit 272ccb8

Please sign in to comment.