xarray_indexing

File Purpose: indexing xarrays

Functions

xarray_argsort(array, dim[, newname, ...])

argsort for xarray.DataArray; returns indexes along dim which would sort array along dim.

xarray_at_max_of(array, of[, dim, ...])

return array values at locations of maximum of.

xarray_at_min_of(array, of[, dim, ...])

return array values at locations of minimum of.

xarray_cmax(array, coord[, where, ...])

return (array of) coord value(s) at array.argmax(dim=dim associated with coord).

xarray_cmin(array, coord[, where, ...])

return (array of) coord value(s) at array.argmin(dim=dim associated with coord).

xarray_isel(array[, indexers, ...])

array.isel(...) which can also interpret fractional indexes between -1 and 1, and promotes non-dim coords.

xarray_map(array, f, *args_f[, axis, axes, ...])

func(array, *args_f, **kw_f), but axis/axes can be provided as strings!

xarray_max_coord_where(array, coord, where, *)

return (array of) maximum value(s) of coord, where condition is True.

xarray_min_coord_where(array, coord, where, *)

return (array of) minimum value(s) of coord, where condition is True.

xarray_search(array, dim, value)

return first index of value along dim

xarray_sel(array[, indexers, ...])

array.sel(...) but prioritize general applicability over efficiency:

xarray_sort_array_along(array, dim[, ...])

returns array, sorted along dim.

xarray_sort_dataset_along(ds, var, dim[, ...])

returns dataset, sorted along var's values for dim.

xarray_varmax(ds, *[, promote_dims_if_needed])

return (array of) var name(s) for var with maximum values in ds.

xarray_varmin(ds, *[, promote_dims_if_needed])

return (array of) var name(s) for var with minimum values in ds.

xarray_where(array, cond[, other, drop, ...])

like xarray's builtin where, but return array unchanged if it has no dims matching cond.