semantique.processor.arrays.Array.groupby

Contents

semantique.processor.arrays.Array.groupby#

Array.groupby(grouper, labels_as_names=True, **kwargs)[source]#

Apply the groupby verb to the array.

The groupby verb groups the values in an array.

Parameters:
  • grouper (xarray.DataArray or Collection) – Array which can be aligned to the same shape as the input array. Pixels in the input array that have equal values in the grouper will be grouped together. Alternatively, it may be a collection of such arrays. Then, pixels in the input array that have equal values in all of the grouper arrays will be grouped together.

  • labels_as_names (bool) – If value labels are defined, should they be used as group names instead of the values themselves?

  • **kwargs – Ignored.

Returns:

Collection

Raises: