MCPcopy Create free account
hub / github.com/numpy/numpy / correlate

Function correlate

numpy/ma/core.py:7982–8007  ·  view source on GitHub ↗

Cross-correlation of two 1-dimensional sequences. Parameters ---------- a, v : array_like Input sequences. mode : {'valid', 'same', 'full'}, optional Refer to the `np.convolve` docstring. Note that the default is 'valid', unlike `convolve`, which uses '

(a, v, mode='valid', propagate_mask=True)

Source from the content-addressed store, hash-verified

7980
7981
7982def correlate(a, v, mode='valid', propagate_mask=True):
7983 """
7984 Cross-correlation of two 1-dimensional sequences.
7985
7986 Parameters
7987 ----------
7988 a, v : array_like
7989 Input sequences.
7990 mode : {'valid', 'same', 'full'}, optional
7991 Refer to the `np.convolve` docstring. Note that the default
7992 is 'valid', unlike `convolve`, which uses 'full'.
7993 propagate_mask : bool
7994 If True, then a result element is masked if any masked element contributes towards it.
7995 If False, then a result element is only masked if no non-masked element
7996 contribute towards it
7997
7998 Returns
7999 -------
8000 out : MaskedArray
8001 Discrete cross-correlation of `a` and `v`.
8002
8003 See Also
8004 --------
8005 numpy.correlate : Equivalent function in the top-level NumPy module.
8006 """
8007 return _convolve_or_correlate(np.correlate, a, v, mode, propagate_mask)
8008
8009
8010def convolve(a, v, mode='full', propagate_mask=True):

Callers

nothing calls this directly

Calls 1

_convolve_or_correlateFunction · 0.85

Tested by

no test coverage detected