tidy3d.plugins.autograd.functions.convolve

Contents

tidy3d.plugins.autograd.functions.convolve#

class convolve[source]#

Bases:

Convolve an array with a given kernel.

Parameters:
  • array (NDArray) – The input array to be convolved.

  • kernel (NDArray) – The kernel to convolve with the input array. All dimensions of the kernel must be odd.

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

  • axes (Union[Tuple[List[int], List[int]], None] = None) – The axes along which to perform the convolution.

  • mode (Literal["full", "valid", "same"] = "same") – The convolution mode.

Returns:

The result of the convolution.

Return type:

NDArray

Raises:

ValueError – If any dimension of the kernel is even. If the dimensions of the kernel do not match the dimensions of the array.

Inherited Common Usage