cupyx.scipy.signal.correlate#
- cupyx.scipy.signal.correlate(in1, in2, mode='full', method='auto')[source]#
Cross-correlate two N-dimensional arrays.
Cross-correlate
in1andin2, with the output size determined by themodeargument.- Parameters:
in1 (cupy.ndarray) – First input.
in2 (cupy.ndarray) – Second input. Should have the same number of dimensions as
in1.mode (str) –
Indicates the size of the output:
'full': output is the full discrete linear convolution (default)'valid': output consists only of those elements that do not rely on the zero-padding. Eitherin1orin2must be at least as large as the other in every dimension.'same': - output is the same size asin1, centered with respect to the'full'output
method (str) –
Indicates which method to use for the computations:
'direct': The convolution is determined directly from sums, the definition of convolution'fft': The Fourier Transform is used to perform the convolution by callingfftconvolve.'auto': Automatically choose direct of FFT based on an estimate of which is faster for the arguments (default).
- Returns:
the result of correlation.
- Return type:
See also
See also
See also
See also
cupyx.scipy.ndimage.correlation()See also
scipy.signal.correlation()Note
By default,
convolveandcorrelateusemethod='auto', which callschoose_conv_methodto choose the fastest method using pre-computed values. CuPy may not choose the same method to compute the convolution as SciPy does given the same inputs.