xarray.Index.equals#
- Index.equals(other, **kwargs)[source]#
Compare this index with another index of the same type.
Implementation is optional but required in order to support alignment.
- Parameters:
other (
Index
) – The other Index object to compare with this object.exclude (
frozenset
of hashable, optional) – Dimensions excluded from checking. It is None by default, (i.e., when this method is not called in the context of alignment). For a n-dimensional index this option allows an Index to optionally ignore any dimension inexclude
when comparingself
withother
. For a 1-dimensional index this kwarg can be safely ignored, as this method is not called when all of the index’s dimensions are also excluded from alignment (note: the index’s dimensions correspond to the union of the dimensions of all coordinate variables associated with this index).
- Returns:
is_equal (
bool
) –True
if the indexes are equal,False
otherwise.