Back to Numerical Arrays (NumPy)
np.convolve
Returns the discrete, linear convolution of two one-dimensional sequences.
Syntax
np.convolve(a, v, mode?)
Description
Returns the discrete, linear convolution of two one-dimensional sequences. The convolution product is only given for points where the signals overlap completely. Values outside the signal boundary have no effect.
Parameters
| Name | Description |
|---|---|
| a | - First one-dimensional input array |
| v | - Second one-dimensional input array |
| mode(optional) | - 'full', 'same', or 'valid': - 'full': Output is the full discrete linear convolution (default) - 'same': Output is the same size as a, centered with respect to the 'full' output - 'valid': Output consists only of those elements that do not rely on zero-padding |
Returns
Promise<NDArray>