Skip to content

Commit

Permalink
Remove explicit type casting in quantized.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 462610652
  • Loading branch information
hamzamerzic authored and DistraxDev committed Jul 22, 2022
1 parent 0ecad05 commit f3a1b88
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions distrax/_src/distributions/quantized.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ==============================================================================
"""Quantized distribution."""

from typing import cast, Optional, Tuple
from typing import Optional, Tuple

import chex
from distrax._src.distributions import distribution as base_distribution
Expand Down Expand Up @@ -107,9 +107,7 @@ def high(self) -> Optional[Array]:
@property
def event_shape(self) -> Tuple[int, ...]:
"""Shape of event of distribution samples."""
event_shape = self.distribution.event_shape
# TODO(b/149413467): Remove explicit casting when resolved.
return cast(Tuple[int, ...], event_shape)
return self.distribution.event_shape

@property
def batch_shape(self) -> Tuple[int, ...]:
Expand Down

0 comments on commit f3a1b88

Please sign in to comment.