def _K_compute_eq(self):
t_eq = self._t[self._index==<NUM_LIT:0>]<EOL>if self._t2 is None:<EOL><INDENT>if t_eq.size==<NUM_LIT:0>:<EOL><INDENT>self._K_eq = np.zeros((<NUM_LIT:0>, <NUM_LIT:0>))<EOL>return<EOL><DEDENT>self._dist2 = np.square(t_eq[:, None] - t_eq[None, :])<EOL><DEDENT>else:<EOL><INDENT>t2_eq = self._t2[self._index2==<NUM_LIT:0>]<EOL>if t_eq.size==<NUM_LIT:0> or t2_eq.size==<NUM_LIT:0>:<EOL><INDENT>self._K_eq = np.zeros((t_eq.size, t2_eq.size))<EOL>return<EOL><DEDENT>self._dist2 = np.square(t_eq[:, None] - t2_eq[None, :])<EOL><DEDENT>self._K_eq = np.exp(-self._dist2/(<NUM_LIT:2>*self.lengthscale*self.lengthscale))<EOL>if self.is_normalized:<EOL><INDENT>self._K_eq/=(np.sqrt(<NUM_LIT:2>*np.pi)*self.lengthscale)<EOL><DEDENT>
Compute covariance for latent covariance.