conv2¶
- dnois.fourier.conv2(f1: Tensor, f2: Tensor, dx: float | Tensor = None, dy: float | Tensor = None, dims: tuple[int, int] = (-2, -1), out: Literal['full', 'same', 'valid'] = 'full', padding: int | tuple[int, int] | str = 'linear', simpson: bool = False, real: bool = None) Tensor ¶
2D version of
conv()
.- Parameters:
f1 (Tensor) – The first array \(f_1\).
f2 (Tensor) – The second array \(f_2\).
dx – Sampling spacing in x direction i.e. the second dimension, either a float, a 0D tensor, or a tensor broadcastable with
f1
andf2
. Default: omitted.dy – Sampling spacing in y direction i.e. the first dimension, similar to
dx
. Default: identical todx
.dims (tuple[int, int]) – The dimensions to be convolved. Default:
(-2,-1)
.out (str) – See
conv()
.padding (int, tuple[int, int] or str) – See
conv()
.simpson (bool) – Whether to apply Simpson’s rule. Default:
True
.real (bool) – See
conv()
.
- Type:
float or Tensor
- Type:
float or Tensor
- Returns:
Convolution between
f1
andf2
. Complex if eitherf1
orf2
is complex orreal=False
, real-valued otherwise.- Return type:
Tensor