def getDerMatrix(self,x=None,z=None,mode=None,der=None):
        self.checkInputGetDerMatrix(x,z,mode,der)
        c   = np.exp(self.hyp[0])             # inhomogeneous offset
        sf2 = np.exp(2.*self.hyp[1])          # signal variance
        ord = self.para[0]                    # order of polynomial
        if np.abs(ord-np.round(ord)) < 1e-8:  # remove numerical error from format of parameter
            ord = int(round(ord))
        assert(ord >= 1.)                     # only nonzero integers for ord
        ord = int(ord)
        if mode == 'self_test':               # self covariances for the test cases
            nn,D = z.shape
            A = np.reshape(np.sum(z*z,1), (nn,1))
        elif mode == 'train':                 # compute covariance matix for dataset x
            A = np.dot(x,x.T)
        elif mode == 'cross':                 # compute covariance between data sets x and z
            A = np.dot(x,z.T)
        if der == 0:                          # compute derivative matrix wrt 1st parameter
            A = c * ord * sf2 * (c+A)**(1-ord)
        elif der == 1:                        # compute derivative matrix wrt 2nd parameter
            A = 2. * sf2 * (c + A)**ord
        elif der == 2:                        # no derivative wrt 3rd parameter
            A = np.zeros_like(A)              # do nothing (d is not learned)
        else:
            raise Exception("Wrong derivative entry in Poly")
        return A
dataset/ETHPy150Open marionmari/pyGPs/pyGPs/Core/cov.py/Poly.getDerMatrix/swapped operands of `-`