geost.models.model_array.ModelDataArray.value_counts#
- ModelDataArray.value_counts(dim: str = None, normalize: bool = False) DataArray[source]#
Get the value counts of unique values in a DataArray.
- Parameters:
dim (str, optional) – Dimension along which to count unique values. The default is None.
normalize (bool, optional) – If True, return the relative frequencies of the unique values instead of the absolute counts. The default is False.
- Returns:
DataArray containing the counts of unique values along the specified dimension.
- Return type:
xr.DataArray