pints
pints copied to clipboard
Make PINTS sampler objects printable using __str__
I think it'd be nice if:
x0 = [3, 4]
sampler = pints.HamiltonianMCMC(x0)
print(sampler)
returned:
"Hamiltonian Monte Carlo sampler initialised at [3, 4]"
If x0 was long, then we could just print the first (say) 10 elements:
"Hamiltonian Monte Carlo sampler initialised at [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,...]"
Some samplers also take sigma0 values but I don't think we should print these since a) I think we're thinking of moving these to be method hyperparameters and b) it'd look ugly.