This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / signal / _signaltools / _apply_conv_mode

function

scipy.signal._signaltools:_apply_conv_mode

source: build-install/usr/lib/python3.14/site-packages/scipy/signal/_signaltools.py:552

Signature

def _apply_conv_mode(ret, s1, s2, mode, axes, xp)

Summary

Calculate the convolution result shape based on the mode argument.

Extended Summary

Returns the result sliced to the correct size for the given mode.

Parameters

ret : array

The result array, with the appropriate shape for the 'full' mode.

s1 : list of int

The shape of the first input.

s2 : list of int

The shape of the second input.

mode : str {'full', 'valid', 'same'}

A string indicating the size of the output. See the documentation fftconvolve for more information.

axes : list of ints

Axes over which to compute the convolution.

Returns

ret : array

A copy of res, sliced to the correct size for the given mode.

Aliases

  • scipy.signal._signaltools._apply_conv_mode