The Gaussian prior setup Gaussian(np.zeros(21*21), 1) works while the Gaussian prior setup Gaussian(0, np.ones(21*21)) fails in the scenario below. This is tested against dev #62 and sprint20_UQ_plot in CUQIpy. We should try it with the latest version after these two branches are merged.
../CUQIpy/cuqi/problem/_problem.py:397: in UQ
samples = self.sample_posterior(Ns)
../CUQIpy/cuqi/problem/_problem.py:332: in sample_posterior
elif hasattr(self.prior,"sqrtprecTimesMean") and hasattr(self.likelihood.distribution,"sqrtprec") and isinstance(self.model,LinearModel):
../CUQIpy/cuqi/distribution/_gaussian.py:238: in sqrtprecTimesMean
return (self.sqrtprec@self.mean).flatten()
/Users/amal/opt/miniconda3/envs/fenicsproject/lib/python3.10/site-packages/scipy/sparse/base.py:560: in __matmul__
return self.__mul__(other)
To make the test pass. I used different representation of the prior: e.g. use Gaussian(np.zeros(21*21), 1) instead of Gaussian(0, np.ones(21*21))
The Gaussian prior setup
Gaussian(np.zeros(21*21), 1)
works while the Gaussian prior setupGaussian(0, np.ones(21*21))
fails in the scenario below. This is tested against dev #62 andsprint20_UQ_plot
inCUQIpy
. We should try it with the latest version after these two branches are merged.This test below failed for the cases 2 and 3,
Specifics of test message
To make the test pass. I used different representation of the prior: e.g. use
Gaussian(np.zeros(21*21), 1)
instead ofGaussian(0, np.ones(21*21))