geost.models.VoxelModel.value_counts#
- VoxelModel.value_counts(variable: str, dim: str = None, normalize: bool = False) DataArray[source]#
Return a DataArray containing the value counts of unique values in a VoxelModel variable.
- Parameters:
variable (str) – Name of the variable in the VoxelModel to count unique values for.
dim (str, optional) – Determine the value counts along a specific dimension. If None, the value counts are calculated for the entire DataArray. 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.
- Return type:
xr.DataArray