lmlib.utils.generator.gen_conv#
- lmlib.utils.generator.gen_conv(base, template)#
Convolves two signals. The output signal shape (number of channels and signal length) is preserved from the base signal.
- Parameters
base (array_like) – Base signal to be convolved, either single- or multi-channel.
template (array_like) – Signal template to be convolved with base, either a single- or multi-channel. If base is multi-channel, the number of channels has to correspond to the number of channels of base.
- Returns
out – If template is a sigle-channel signal, the convolution is applied to each channel of base, otherwise the convolution between base and template is applied per-channel. The output signal is of the same dimension as base signal, cf.
numpy.convolve(..., mode='same')
.- Return type
ndarray
, shape=(K,)
Example