xugrid.UgridDataArrayAccessor.binary_dilation#

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

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

Compare with scipy.ndimage.binary_dilation().

Parameters:
  • iterations (int, default: 1)

  • mask (1d array of bool, optional)

  • border_value (bool, default value: False)

Returns:

dilated

Return type:

UgridDataArray