(m, l)
return distance
Compute distance between two trajectories

        Parameters
        ----------
        m : np.ndarray

        l : np.ndarray

        Returns
        -------
        numpy.ndarray
Compute distance between two trajectories
Compute distance between two trajectories
def compute_distance(m, l):
        '''Compute distance between two trajectories

        Parameters
        ----------
        m : np.ndarray

        l : np.ndarray

        Returns
        -------
        numpy.ndarray
        '''

        if np.shape(m) != np.shape(l):
            raise ValueError("Input matrices are different sizes")
        if np.array_equal(m, l):
            # print("Trajectory %s and %s are equal" % (m, l))
            distance = 0
        else:
            distance = np.array(np.sum(cdist(m, l)), dtype=np.float32)

        return distance
def compute_distance ( m , l ) : if np . shape ( m ) != np . shape ( l ) : raise ValueError ( "Input matrices are different sizes" ) if np . array_equal ( m , l ) : # print("Trajectory %s and %s are equal" % (m, l)) distance = 0 else : distance = np . array ( np . sum ( cdist ( m , l ) ) , dtype = np . float32 ) return distance