# xarray.IndexVariable.any

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

Reduce this NamedArray’s data by applying `any` 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 `any`. 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 `any` on this object’s data.
    These could include dask-specific kwargs like `split_every`.
* **Returns:**
  **reduced** (`NamedArray`) – New NamedArray with `any` applied to its data and the
  indicated dimension(s) removed

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

[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('069b5fb0-09c2-4f81-8ebf-b5ed674c8278','43ea6cfc-8d9d-4ba3-9868-f87b90e66956','92a64413-0c0e-4bfd-9f05-b5792752bed3','../lite/tree/../notebooks/index.html?path=1e6aae63_6c4c_45b5_afd7_ced427f6ca89.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.any()
<xarray.NamedArray ()> Size: 1B
array(True)
```

<div id="92a64413-0c0e-4bfd-9f05-b5792752bed3" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('069b5fb0-09c2-4f81-8ebf-b5ed674c8278','92a64413-0c0e-4bfd-9f05-b5792752bed3')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('069b5fb0-09c2-4f81-8ebf-b5ed674c8278','92a64413-0c0e-4bfd-9f05-b5792752bed3')">Open In Tab</button></div><div id="43ea6cfc-8d9d-4ba3-9868-f87b90e66956" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
