# 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('ae6657bc-9ba9-47a6-aa14-796d94dde188','927d8bc7-645c-4b61-aaa4-d5d17c37341d','9edbb174-d7d7-4b30-a89a-0f1978158c96','../lite/tree/../notebooks/index.html?path=1b75ee81_80a7_4e62_a26e_c46bc867c7d5.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="9edbb174-d7d7-4b30-a89a-0f1978158c96" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('ae6657bc-9ba9-47a6-aa14-796d94dde188','9edbb174-d7d7-4b30-a89a-0f1978158c96')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('ae6657bc-9ba9-47a6-aa14-796d94dde188','9edbb174-d7d7-4b30-a89a-0f1978158c96')">Open In Tab</button></div><div id="927d8bc7-645c-4b61-aaa4-d5d17c37341d" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
