# xarray.IndexVariable.all

#### IndexVariable.all(dim=None, \*\*kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/namedarray/_aggregations.py#L80-L132)

Reduce this NamedArray’s data by applying `all` along some dimension(s).

* **Parameters:**
  * **dim** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), `Iterable` of `Hashable`, `"..."` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *default*: [`None`](https://docs.python.org/3/builtins/constants.html#None)) – Name of dimension[s] along which to apply `all`. For e.g. `dim="x"`
    or `dim=["x", "y"]`. If “…” or None, will reduce over all dimensions.
  * **\*\*kwargs** (`Any`) – Additional keyword arguments passed on to the appropriate array
    function for calculating `all` on this object’s data.
    These could include dask-specific kwargs like `split_every`.
* **Returns:**
  **reduced** (`NamedArray`) – New NamedArray with `all` applied to its data and the
  indicated dimension(s) removed

#### SEE ALSO
[`numpy.all`](https://numpy.org/doc/stable/reference/generated/numpy.all.html#numpy.all), [`dask.array.all`](https://docs.dask.org/en/latest/generated/dask.array.all.html#dask.array.all), [`Dataset.all`](xarray.Dataset.all.html.md#xarray.Dataset.all), [`DataArray.all`](xarray.DataArray.all.html.md#xarray.DataArray.all)

[Aggregation](../user-guide/computation.html.md#agg)
: User guide on reduction or aggregation operations.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('3714f0bc-3745-4d73-ac01-c5dd1d6344fd','4f7372d5-23c4-4d92-a17a-51ecd60b1e27','62a8ec5d-aef1-4dc4-b6ef-afcbc8faa708','../lite/tree/../notebooks/index.html?path=2938dd3a_cf4d_4aa2_8a41_418a653d18e1.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> from xarray.namedarray.core import NamedArray
>>> na = NamedArray(
...     "x", np.array([True, True, True, True, True, False], dtype=bool)
... )
>>> na
<xarray.NamedArray (x: 6)> Size: 6B
array([ True,  True,  True,  True,  True, False])
```

```pycon
>>> na.all()
<xarray.NamedArray ()> Size: 1B
array(False)
```

<div id="62a8ec5d-aef1-4dc4-b6ef-afcbc8faa708" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('3714f0bc-3745-4d73-ac01-c5dd1d6344fd','62a8ec5d-aef1-4dc4-b6ef-afcbc8faa708')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('3714f0bc-3745-4d73-ac01-c5dd1d6344fd','62a8ec5d-aef1-4dc4-b6ef-afcbc8faa708')">Open In Tab</button></div><div id="4f7372d5-23c4-4d92-a17a-51ecd60b1e27" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
