" Computes the cort between serie one and two (assuming they have the same length)\n\n :param s1: the first serie (or any iterable over floats64)\n :param s2: the second serie (or any iterable over floats64)\n :returns: the cort distance\n :rtype: float64\n\n "
num=0.0
sum_square_x=0.0
sum_square_y=0.0
fortinrange((len(s1)-1)):
slope_1=s1[(t+1)]-s1[t]
slope_2=s2[(t+1)]-s2[t]
num+=slope_1*slope_2
sum_square_x+=slope_1*slope_1
sum_square_y+=slope_2*slope_2
returnnum/np.sqrt((sum_square_x*sum_square_y))
""" Computes the cort between series one and two (assuming they have the same length)
:param s1: the first series (or any iterable over floats64)
:param s2: the second series (or any iterable over floats64)