Reduce this DataArray's data by applying ``min`` along some dimension(s). Parameters ---------- dim : str, Iterable of Hashable, "..." or None, default: None Name of dimension[s] along which to apply ``min``. For e.g. ``dim="x"`` or ``dim=["x
(
self,
dim: Dims = None,
*,
skipna: bool | None = None,
keep_attrs: bool | None = None,
**kwargs: Any,
)
| 7198 | return out |
| 7199 | |
| 7200 | def min( |
| 7201 | self, |
| 7202 | dim: Dims = None, |
| 7203 | *, |
| 7204 | skipna: bool | None = None, |
| 7205 | keep_attrs: bool | None = None, |
| 7206 | **kwargs: Any, |
| 7207 | ) -> DataArray: |
| 7208 | """ |
| 7209 | Reduce this DataArray's data by applying ``min`` along some dimension(s). |
| 7210 | |
| 7211 | Parameters |
| 7212 | ---------- |
| 7213 | dim : str, Iterable of Hashable, "..." or None, default: None |
| 7214 | Name of dimension[s] along which to apply ``min``. For e.g. ``dim="x"`` |
| 7215 | or ``dim=["x", "y"]``. If None, will reduce over the GroupBy dimensions. |
| 7216 | If "...", will reduce over all dimensions. |
| 7217 | skipna : bool or None, optional |
| 7218 | If True, skip missing values (as marked by NaN). By default, only |
| 7219 | skips missing values for float dtypes; other dtypes either do not |
| 7220 | have a sentinel missing value (int) or ``skipna=True`` has not been |
| 7221 | implemented (object, datetime64 or timedelta64). |
| 7222 | keep_attrs : bool or None, optional |
| 7223 | If True, ``attrs`` will be copied from the original |
| 7224 | object to the new one. If False, the new object will be |
| 7225 | returned without attributes. |
| 7226 | **kwargs : Any |
| 7227 | Additional keyword arguments passed on to the appropriate array |
| 7228 | function for calculating ``min`` on this object's data. |
| 7229 | These could include dask-specific kwargs like ``split_every``. |
| 7230 | |
| 7231 | Returns |
| 7232 | ------- |
| 7233 | reduced : DataArray |
| 7234 | New DataArray with ``min`` applied to its data and the |
| 7235 | indicated dimension(s) removed |
| 7236 | |
| 7237 | See Also |
| 7238 | -------- |
| 7239 | numpy.min |
| 7240 | dask.array.min |
| 7241 | DataArray.min |
| 7242 | :ref:`groupby` |
| 7243 | User guide on groupby operations. |
| 7244 | |
| 7245 | Notes |
| 7246 | ----- |
| 7247 | Use the ``flox`` package to significantly speed up groupby computations, |
| 7248 | especially with dask arrays. Xarray will use flox by default if installed. |
| 7249 | Pass flox-specific keyword arguments in ``**kwargs``. |
| 7250 | See the `flox documentation <https://flox.readthedocs.io>`_ for more. |
| 7251 | |
| 7252 | Examples |
| 7253 | -------- |
| 7254 | >>> da = xr.DataArray( |
| 7255 | ... np.array([1, 2, 3, 0, 2, np.nan]), |
| 7256 | ... dims="time", |
| 7257 | ... coords=dict( |
nothing calls this directly
no test coverage detected