mlx.core.convolve

Contents

mlx.core.convolve#

convolve(a: array, v: array, /, mode: str = 'full', *, stream: None | Stream | Device = None) array#

The discrete convolution of 1D arrays.

If v is longer than a, then they are swapped. The conv filter is flipped following signal processing convention.

Parameters:
  • a (array) – 1D Input array.

  • v (array) – 1D Input array.

  • mode (str, optional) – {‘full’, ‘valid’, ‘same’}

Returns:

The convolved array.

Return type:

array