cunumeric.convolve#

cunumeric.convolve(a: ndarray, v: ndarray, mode: ConvolveMode = 'full') ndarray#

Returns the discrete, linear convolution of two ndarrays.

If a and v are both 1-D and v is longer than a, the two are swapped before computation. For N-D cases, the arguments are never swapped.

Parameters:
  • a ((N,) array_like) – First input ndarray.

  • v ((M,) array_like) – Second input ndarray.

  • mode ({'full', 'valid', 'same'}, optional) –

    ‘same’:

    The output is the same size as a, centered with respect to the ‘full’ output. (default)

    ’full’:

    The output is the full discrete linear convolution of the inputs.

    ’valid’:

    The output consists only of those elements that do not rely on the zero-padding. In ‘valid’ mode, either a or v must be at least as large as the other in every dimension.

Returns:

out – Discrete, linear convolution of a and v.

Return type:

ndarray

See also

numpy.convolve

Notes

The current implementation only supports the ‘same’ mode.

Unlike numpy.convolve, cunumeric.convolve supports N-dimensional inputs, but it follows NumPy’s behavior for 1-D inputs.

Availability:

Multiple GPUs, Multiple CPUs