def Kdiag(self, X):
K_ff = np.ones(X.shape[<NUM_LIT:0>])<EOL>for i,x in enumerate(X):<EOL><INDENT>for il,l in enumerate(self.lengthscale):<EOL><INDENT>idx = il*<NUM_LIT:2><EOL>K_ff[i] *= self.k_ff(x[idx],x[idx],l)<EOL><DEDENT><DEDENT>return K_ff * self.variances[<NUM_LIT:0>]<EOL>
I've used the fact that we call this method for K_ff when finding the covariance as a hack so
        I know if I should return K_ff or K_xx. In this case we're returning K_ff!!
        $K_{ff}^{post} = K_{ff} - K_{fx} K_{xx}^{-1} K_{xf}$