def linearize(self, x):

        thetas = power(10., self.thetas)
        r = exp(-thetas.dot(square((x - self.X).T)))

        # Z = einsum('i,ij->ij', X, Y) is equivalent to, but much faster and
        # memory efficient than, diag(X).dot(Y) for vector X and 2D array Y.
        # I.e. Z[i,j] = X[i]*Y[i,j]
        gradr = r * -2 * einsum('i,ij->ij', thetas, (x - self.X).T)
        jac = gradr.dot(self.R_solve_ymu).T
        return jac
Calculates the jacobian of the Kriging surface at the requested point.
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/surrogate_models/kriging.py/KrigingSurrogate.linearize