jax.scipy.signal.correlate#
- jax.scipy.signal.correlate(in1, in2, mode='full', method='auto', precision=None)[source]#
Cross-correlation of two N-dimensional arrays.
JAX implementation of
jax.scipy.signal.correlate()
.- Parameters:
in1 (Array) – left-hand input to the cross-correlation.
in2 (Array) – right-hand input to the cross-correlation. Must have
in1.ndim == in2.ndim
.mode (str) –
controls the size of the output. Available operations are:
"full"
: (default) output the full cross-correlation of the inputs."same"
: return a centered portion of the"full"
output which is the same size asin1
."valid"
: return the portion of the"full"
output which do not depend on padding at the array edges.
method (str) –
controls the computation method. Options are
"auto"
: (default) always uses the"direct"
method."direct"
: lower tojax.lax.conv_general_dilated()
."fft"
: compute the result via a fast Fourier transform.
precision (str | Precision | tuple[str, str] | tuple[Precision, Precision] | None) – Specify the precision of the computation. Refer to
jax.lax.Precision
for a description of available values.
- Returns:
Array containing the cross-correlation result.
- Return type:
See also
jax.numpy.correlate()
: 1D cross-correlationjax.scipy.signal.correlate2d()
: 2D cross-correlationjax.scipy.signal.convolve()
: ND convolution