semantique.processor.arrays.Array.trim#
- Array.trim(dimension=None, **kwargs)[source]#
Apply the trim verb to the array.
The trim verb trims the dimensions of an array, meaning that all dimension coordinates for which all values are missing are removed from the array. The spatial dimensions are only trimmed at their edges, to preserve their regularity.
- Parameters:
dimension (
str
) – Name of the dimension to be trimmed. IfNone
, all dimensions will be trimmed.- Returns:
- Raises:
exceptions.UnknownDimensionError – If a dimension with the given name is not present in the array.