-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set values <-1e150 to -1e150 to fix overflow issues which happen beca… (
#71) * set values <-1e150 to -1e150 to fix overflow issues which happen because of cobaya's logzero=1e300 definition * add logzero kwarg, set logL<=logzero to -numpy.inf, add logsumexpinf() function to handle -inf input to logsumexp * test if logL_birth isinstance(int), special MultiNest case for old MN data * add test for utils function logsumexpinf * make logsumexpinf docstring conform with convention=numpy * catch expected warning in test_logsumexpinf * rename utils.logsumexpinf to utils.logsumexp and replace scipy's logsumexp completely with the utils.py version * add doc entry for logzero in NestedSamples * remove unnecessary abbreviation for scipy's * remove unnecessary newline * make utils.logsumexp match signature of scipy.special.logsumexp * add simple arg test to test_build_mcmc for using logzero kwarg in NestedSamples * add test for effect of logzero conversion, move logzero conversion from root reading branch (if root is not None) to kwarg branch (else) where it acts on both * add test for logzero not changing anything and for logzero not affecting rest of logL * change logzero default from -numpy.inf to -1e30 (as in CosmoMC and MontePython) * move logzero check up in hierarchy from NestedSamples to MCMCSamples * add tests for using logzero kwarg with MCMCSamples * correct indent for PEP8 Co-authored-by: lukas hergt <lh561@cam.ac.uk>
- Loading branch information
1 parent
2626a52
commit 6e953fd
Showing
4 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters