# xarray.DataArray.identical

#### DataArray.identical(other)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/dataarray.py#L4946-L5004)

Check whether two DataArrays are identical.

Like equals, but also checks the array name, attributes, attributes on
all coordinates, and indexes.

* **Parameters:**
  **other** ([`DataArray`](xarray.DataArray.html.md#xarray.DataArray)) – DataArray to compare to.
* **Returns:**
  **equal** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool)) – True if the two DataArrays are identical.

#### SEE ALSO
[`DataArray.broadcast_equals`](xarray.DataArray.broadcast_equals.html.md#xarray.DataArray.broadcast_equals), [`DataArray.equals`](xarray.DataArray.equals.html.md#xarray.DataArray.equals)

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('e38c9dad-f45a-40d8-a4fd-117263c27763','ddcb362d-637b-4759-9b59-bb6a476d8d08','ca4af041-182a-4b4b-a93f-a39ce9d766f4','../lite/tree/../notebooks/index.html?path=fe3e2e19_1c4e_408f_8428_5bf5d5369a41.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> a = xr.DataArray([1, 2, 3], dims="X", attrs=dict(units="m"), name="Width")
>>> b = xr.DataArray([1, 2, 3], dims="X", attrs=dict(units="m"), name="Width")
>>> c = xr.DataArray([1, 2, 3], dims="X", attrs=dict(units="ft"), name="Width")
>>> a
<xarray.DataArray 'Width' (X: 3)> Size: 24B
array([1, 2, 3])
Dimensions without coordinates: X
Attributes:
    units:    m
>>> b
<xarray.DataArray 'Width' (X: 3)> Size: 24B
array([1, 2, 3])
Dimensions without coordinates: X
Attributes:
    units:    m
>>> c
<xarray.DataArray 'Width' (X: 3)> Size: 24B
array([1, 2, 3])
Dimensions without coordinates: X
Attributes:
    units:    ft
```

```pycon
>>> a.equals(b)
True
>>> a.identical(b)
True
```

```pycon
>>> a.equals(c)
True
>>> a.identical(c)
False
```

<div id="ca4af041-182a-4b4b-a93f-a39ce9d766f4" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('e38c9dad-f45a-40d8-a4fd-117263c27763','ca4af041-182a-4b4b-a93f-a39ce9d766f4')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('e38c9dad-f45a-40d8-a4fd-117263c27763','ca4af041-182a-4b4b-a93f-a39ce9d766f4')">Open In Tab</button></div><div id="ddcb362d-637b-4759-9b59-bb6a476d8d08" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
