Examples -------- Find the correlation between two arrays. >>> from scipy.spatial.distance import correlation >>> correlation([1, 0, 1], [1, 1, 0]) 1.5 Using a weighting array, the correlation can be calculated as: >>> correlation([1, 0, 1], [1, 1, 0], w=[0.9, 0.1, 0.1]) 1.1 If centering is not needed, the correlation can be calculated as: >>> correlation([1, 0, 1], [1, 1, 0], centered=False) 0.5 zKComplex `u` and `v` are deprecated and will raise an error in SciPy 1.17.0.r(