apply_convolution_mode#

apply_convolution_mode(arr, convolution_mode, s1, s2, convolution_shape=None, mask_output=False)[source]#

Applies convolution_mode to arr.

Parameters:
arrBackendArray

Array containing convolution result of arrays with shape s1 and s2.

convolution_modestr

Analogous to mode in obj:scipy.signal.convolve:

‘full’

returns full template matching result of the inputs.

‘valid’

returns elements that do not rely on zero-padding..

‘same’

output is the same size as s1.

s1tuple of ints

Tuple of integers corresponding to shape of convolution array 1.

s2tuple of ints

Tuple of integers corresponding to shape of convolution array 2.

convolution_shapetuple of ints, optional

Size of the actually computed convolution. s1 + s2 - 1 by default.

mask_outputbool, optional

Whether to mask values outside of convolution_mode rather than removing them. Defaults to False.

Returns:
BackendArray

The array after applying the convolution mode.