# mlx.core.convolve — MLX 0.0.7 documentation

Skip to main content
`Ctrl`+`K`

# mlx.core.convolve

mlx.core.convolve(a: array, v: array, /, mode: str = 'full', *, stream: Union[ 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