tidy3d.plugins.autograd.functions.morphological_gradient_internal

tidy3d.plugins.autograd.functions.morphological_gradient_internal#

class morphological_gradient_internal[source]#

Bases:

Compute the internal morphological gradient of an array.

Parameters:
  • array (np.ndarray) – The input array to compute the internal morphological gradient of.

  • size (Union[Union[int, Tuple[int, int]], None] = None) – The size of the structuring element. If None, structure must be provided.

  • structure (Union[np.ndarray, None] = None) – The structuring element. If None, size must be provided.

  • mode (PaddingType = "reflect") – The padding mode to use.

  • maxval (float = 1e4) – Value to assume for infinite elements in the kernel.

Returns:

The internal morphological gradient of the input array.

Return type:

np.ndarray

Inherited Common Usage