xugrid.UgridDataArrayAccessor.binary_erosion#

UgridDataArrayAccessor.binary_erosion(iterations: int = 1, mask=None, border_value=False)[source]#

Binary erosion can be used on a boolean array to shrink the “shape” of features.

Compare with scipy.ndimage.binary_erosion().

Parameters:
  • iterations (int, default: 1)

  • mask (1d array of bool, optional)

  • border_value (bool, default value: False)

Returns:

eroded

Return type:

UgridDataArray