arctichoke.dataset.get_min_max
Functions
|
Get the minimum / maximum of the dataset. |
Module Contents
- arctichoke.dataset.get_min_max.get_min_max(dataset: str, xarray.DataArray, xarray.Dataset, var: str = None)
Get the minimum / maximum of the dataset.
Opens the given dataset, finds the given variable if xr.Dataset, returns the minimum / maximum values of that data.
- Parameters:
dataset (str, xarray.DataArray, xarray.Dataset) – The dataset for which to determine the minimum / maximum values.
var (str, None, optional) – The variable in dataset for which to find the minimum / maximum. Default is None.
- Returns:
var_min (int, float) – The minimum value of the data.
var_max (int, float) – The maximum value of the data.
Examples
>>> from arctichoke.dataset.example_dataset import make_example_dataset >>> from arctichoke.dataset.get_min_max import get_min_max >>> dataset = make_example_dataset(n=3) >>> min, max = get_min_max(dataset, var='test_var') >>> print('min:',min,'max:',max) min: 0.0 max: 8.0