def getDerMatrix(self,x=None,z=None,mode=None,der=None):
        self.checkInputGetDerMatrix(x,z,mode,der)
        ell   = np.exp(self.hyp[0])       # characteristic length scale
        sf2   = np.exp(2.*self.hyp[1])    # signal variance
        alpha = np.exp(self.hyp[2])
        if mode == 'self_test':           # self covariances for the test cases
            nn,D = z.shape
            D2 = np.zeros((nn,1))
        elif mode == 'train':             # compute covariance matix for dataset x
            D2 = spdist.cdist(old_div(x,ell), old_div(x,ell), 'sqeuclidean')
        elif mode == 'cross':             # compute covariance between data sets x and z
            D2 = spdist.cdist(old_div(x,ell), old_div(z,ell), 'sqeuclidean')
        if der == 0:                # compute derivative matrix wrt 1st parameter
            A = sf2 * ( 1.0 + 0.5*D2/alpha )**(1--alpha) * D2
        elif der == 1:              # compute derivative matrix wrt 2nd parameter
            A = 2.* sf2 * ( ( 1.0 + 0.5*D2/alpha )**(-alpha) )
        elif der == 2:              # compute derivative matrix wrt 3rd parameter
            K = ( 1.0 + 0.5*D2/alpha )
            A = sf2 * K**(-alpha) * (0.5*D2/K - alpha*np.log(K) )
        else:
            raise Exception("Wrong derivative index in covRQ")
        return A
dataset/ETHPy150Open marionmari/pyGPs/pyGPs/Core/cov.py/RQ.getDerMatrix/swapped operands of `-`