class_docstr: Describes how a :class:`jax.Array` is laid out across devices.
    
class_docstr_tok: ["Describes","how","a",":","class",":","`","jax.Array","`","is","laid","out","across","devices","."]
docstr: Returns ``True`` if two shardings are equivalent.
  
  Two shardings are equivalent if they place the same logical array shards on
  the same devices.
  
  For example, a :class:`NamedSharding` may be equivalent
  to a :class:`PositionalSharding` if both place the same shards of the array
  on the same devices.
docstr_tok: ["Returns","``","True","``","if","two","shardings","are","equivalent",".","Two","shardings","are","equivalent","if","they","place","the","same","logical","array","shards","on","the","same","devices",".","For","example",",","a",":","class",":","`","NamedSharding","`","may","be","equivalent","to","a",":","class",":","`","PositionalSharding","`","if","both","place","the","same","shards","of","the","array","on","the","same","devices","."]
code: def is_equivalent_to(self, other: Sharding, ndim: int) -> bool:
      """Returns ``True`` if two shardings are equivalent.
  
      Two shardings are equivalent if they place the same logical array shards on
      the same devices.
  
      For example, a :class:`NamedSharding` may be equivalent
      to a :class:`PositionalSharding` if both place the same shards of the array
      on the same devices.
      """
      raise NotImplementedError(
          "Subclasses should implement this method."
      )
  
file_path: jax/jax/_src/sharding.py
imports: from __future__ import annotations
  from collections.abc import Mapping, Sequence
  import functools
  from jax._src import util
  from jax._src import xla_bridge
  from jax._src.lib import xla_client
label_desc: Use image node_id 4 for calling the Sharding obj's underlying member method code with example usage: obj.is_equivalent_to(other, ndim) without return types