Skip to content

Commit

Permalink
Fix warning of the form DeprecationWarning: jax.core.Shape is depreca…
Browse files Browse the repository at this point in the history
…ted. Use Shape = Sequence[int | Any]

PiperOrigin-RevId: 573020724
  • Loading branch information
ChexDev authored and ChexDev committed Oct 12, 2023
1 parent c69eeb3 commit b3fd7c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chex/_src/pytypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ==============================================================================
"""Type definitions to use for type annotations."""

from typing import Any, Iterable, Mapping, Union
from typing import Any, Iterable, Mapping, Union, Sequence

import jax
import numpy as np
Expand Down Expand Up @@ -52,7 +52,7 @@
# Other types.
Scalar = Union[float, int]
Numeric = Union[Array, Scalar]
Shape = jax.core.Shape
Shape = Sequence[int | Any]
PRNGKey = jax.Array
PyTreeDef = jax.tree_util.PyTreeDef
Device = jax.Device
Expand Down

0 comments on commit b3fd7c2

Please sign in to comment.