# xarray.Variable.any

#### Variable.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('49b867d8-1a71-4da7-b76b-195d1613ccdb','55b44b2f-c7ca-4d81-b5c5-2dff3d4bc944','5610c467-bf95-482d-b7d9-73192259cb67','../lite/tree/../notebooks/index.html?path=a729d849_b34e_4f48_b989_1d665e119eea.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="5610c467-bf95-482d-b7d9-73192259cb67" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('49b867d8-1a71-4da7-b76b-195d1613ccdb','5610c467-bf95-482d-b7d9-73192259cb67')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('49b867d8-1a71-4da7-b76b-195d1613ccdb','5610c467-bf95-482d-b7d9-73192259cb67')">Open In Tab</button></div><div id="55b44b2f-c7ca-4d81-b5c5-2dff3d4bc944" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
