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 (_pad_modes, optional) โ The padding mode to use. Default is โconstantโ.
axes (Union[Tuple[List[int], List[int]], None], optional) โ The axes along which to perform the convolution. Default is None (all axes).
mode (Literal["full", "valid", "same"], optional) โ The convolution mode. Default is โsameโ.
- 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