def _unscaled_dist(self, X, X2=None):
        #X, = self._slice_X(X)
        if X2 is None:
            Xsq = np.sum(np.square(X),1)
            r2 = -2.*tdot(X) + (Xsq[:,None] + Xsq[None,:])
            util.diag.view(r2)[:,]= 0. # force diagnoal to be zero: sometime numerically a little negative
            r2 = np.clip(r2, 0, np.inf)
            return np.sqrt(r2)
        else:
            #X2, = self._slice_X(X2)
            X1sq = np.sum(np.square(X),1)
            X2sq = np.sum(np.square(X2),1)
            r2 = -2.*np.dot(X, X2.T) + X1sq[:,None] + X2sq[None,:]
            r2 = np.clip(r2, 0, np.inf)
            return np.sqrt(r2)
copies versions from one task to another
dataset/ETHPy150Open SheffieldML/GPy/GPy/kern/src/stationary.py/Stationary._unscaled_dist--crossover with--dataset/ETHPy150Open eoyilmaz/anima/anima/ui/version_mover.py/VersionMover.copy_versions