jax.numpy.correlate¶
-
jax.numpy.correlate(a, v, mode='valid', *, precision=None)[source]¶ Cross-correlation of two 1-dimensional sequences.
LAX-backend implementation of
correlate().In addition to the original NumPy arguments listed below, also supports
precisionfor extra control over matrix-multiplication precision on supported devices.precisionmay be set toNone, which means default precision for the backend, alax.Precisionenum value (Precision.DEFAULT,Precision.HIGHorPrecision.HIGHEST) or a tuple of twolax.Precisionenums indicating separate precision for each argument.Original docstring below.
This function computes the correlation as generally defined in signal processing texts:
c_{av}[k] = sum_n a[n+k] * conj(v[n])
with a and v sequences being zero-padded where necessary and conj being the conjugate.
- Parameters
a (array_like) – Input sequences.
v (array_like) – Input sequences.
mode ({'valid', 'same', 'full'}, optional) – Refer to the convolve docstring. Note that the default is ‘valid’, unlike convolve, which uses ‘full’.
old_behavior (bool) – old_behavior was removed in NumPy 1.10. If you need the old behavior, use multiarray.correlate.
- Returns
out – Discrete cross-correlation of a and v.
- Return type