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 16, 2023
1 parent c69eeb3 commit 34e8d09
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, Sequence, Union

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[Union[int, Any]]
PRNGKey = jax.Array
PyTreeDef = jax.tree_util.PyTreeDef
Device = jax.Device
Expand Down

0 comments on commit 34e8d09

Please sign in to comment.