Function convolve

Source
pub fn convolve<S, A, D>(
    data: &ArrayBase<S, D>,
    weights: &ArrayBase<S, D>,
    mode: BorderMode<A>,
    origin: isize,
) -> Array<A, D>
where S: Data<Elem = A>, A: Copy + Num + FromPrimitive + PartialOrd, D: Dimension,
Expand description

Multidimensional convolution.

The array is convolved with the given kernel.

  • data - The input N-D data.
  • weights - Array of weights, same number of dimensions as data.
  • mode - Method that will be used to select the padded values. See the BorderMode enum for more information.
  • origin - Controls the placement of the filter on the input array’s pixels. A value of 0 centers the filter over the pixel, with positive values shifting the filter to the left, and negative ones to the right.