numpy.correlate() function - Python Last Updated : 11 Jun, 2020 Comments Improve Suggest changes Like Article Like Report numpy.correlate() function defines the cross-correlation of two 1-dimensional sequences. This function computes the correlation as generally defined in signal processing texts: c_{av}[k] = sum_n a[n+k] * conj(v[n]) Syntax : numpy.correlate(a, v, mode = 'valid') Parameters : a, v : [array_like] Input sequences. mode : [{‘valid’, ‘same’, ‘full’}, optional] Refer to the convolve docstring. Default is ‘valid’. Return : [ndarray] Discrete cross-correlation of a and v. Code #1 : Python3 # Python program explaining # numpy.correlate() function # importing numpy as geek import numpy as geek a = [2, 5, 7] v = [0, 1, 0.5] gfg = geek.correlate(a, v) print (gfg) Output : [8.5] Code #2 : Python3 # Python program explaining # numpy.correlate() function # importing numpy as geek import numpy as geek a = [2, 5, 7] v = [0, 1, 0.5] gfg = geek.correlate(a, v, "same") print (gfg) Output : [4.5 8.5 7. ] Comment More infoAdvertise with us Next Article numpy.correlate() function - Python S sanjoy_62 Follow Improve Article Tags : Python Python-numpy Practice Tags : python Similar Reads Python | numpy.cov() function Covariance provides the measure of strength of correlation between two variable or more set of variables. The covariance matrix element Cij is the covariance of xi and xj. The element Cii is the variance of xi. If COV(xi, xj) = 0 then variables are uncorrelatedIf COV(xi, xj) > 0 then variables po 2 min read numpy.cos() in Python numpy.cos(x[, out]) = ufunc 'cos') : This mathematical function helps user to calculate trigonometric cosine for all x(being the array elements). Parameters : array : [array_like]elements are in radians. 2pi Radians = 360 degrees Return : An array with trigonometric cosine of x for all x i.e. array 2 min read numpy.cosh() in Python The numpy.cosh() is a mathematical function that helps user to calculate hyperbolic cosine for all x(being the array elements). Equivalent to 1/2 * (np.exp(x) - np.exp(-x)) and np.cos(1j*x). Syntax : numpy.cosh(x[, out]) = ufunc 'cos') Parameters : array : [array_like] elements are in radians. 2pi R 2 min read Matplotlib.axes.Axes.acorr() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Plotting Correlation Matrix using Python Correlation means an association, It is a measure of the extent to which two variables are related. 1. Positive Correlation: When two variables increase together and decrease together. They are positively correlated. '1' is a perfect positive correlation. For example - demand and profit are positiv 3 min read Like