# xarray.NamedArray.any

#### NamedArray.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('50817843-66ee-4e93-81ea-b531e110f0f6','5bfe2cca-0651-4cdc-ba4e-b26c5b8da6d4','9b8fc80f-4bbe-45d9-8a5f-396119cff1e2','../lite/tree/../notebooks/index.html?path=9ab7d60b_f425_402a_9524_b41dcb5bf854.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="9b8fc80f-4bbe-45d9-8a5f-396119cff1e2" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('50817843-66ee-4e93-81ea-b531e110f0f6','9b8fc80f-4bbe-45d9-8a5f-396119cff1e2')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('50817843-66ee-4e93-81ea-b531e110f0f6','9b8fc80f-4bbe-45d9-8a5f-396119cff1e2')">Open In Tab</button></div><div id="5bfe2cca-0651-4cdc-ba4e-b26c5b8da6d4" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
