def posterior_samples_f(self,X, size=<NUM_LIT:10>, **predict_kwargs):
predict_kwargs["<STR_LIT>"] = True  <EOL>m, v = self._raw_predict(X,  **predict_kwargs)<EOL>if self.normalizer is not None:<EOL><INDENT>m, v = self.normalizer.inverse_mean(m), self.normalizer.inverse_variance(v)<EOL><DEDENT>def sim_one_dim(m, v):<EOL><INDENT>return np.random.multivariate_normal(m, v, size).T<EOL><DEDENT>if self.output_dim == <NUM_LIT:1>:<EOL><INDENT>return sim_one_dim(m.flatten(), v)[:, np.newaxis, :]<EOL><DEDENT>else:<EOL><INDENT>fsim = np.empty((X.shape[<NUM_LIT:0>], self.output_dim, size))<EOL>for d in range(self.output_dim):<EOL><INDENT>if v.ndim == <NUM_LIT:3>:<EOL><INDENT>fsim[:, d, :] = sim_one_dim(m[:, d], v[:, :, d])<EOL><DEDENT>else:<EOL><INDENT>fsim[:, d, :] = sim_one_dim(m[:, d], v)<EOL><DEDENT><DEDENT><DEDENT>return fsim<EOL>
Samples the posterior GP at the points X.

:param X: The points at which to take the samples.
:type X: np.ndarray (Nnew x self.input_dim)
:param size: the number of a posteriori samples.
:type size: int.
:returns: set of simulations
:rtype: np.ndarray (Nnew x D x samples)