joshspeagle / dynesty

Dynamic Nested Sampling package for computing Bayesian posteriors and evidences
https://dynesty.readthedocs.io/
MIT License
346 stars 76 forks source link

get rid of npdim #457

Closed segasai closed 9 months ago

segasai commented 10 months ago

This gets rid of npdim and produces a couple of deprecation warnings.

A couple of decisions I had to make -- I made sure to rename all the npdim= keywords in various classes (other than the top ones like NestedSampler and DynamicNestedSampler) to ndim=. The reason is that I prefer minimize the number of concepts/standard variable names throughout the code. The consequence of that is that when we release this i don't quite know if restoring checkpoints from previous version will be possible. I don't think it is a big deal, but not everyone may agree.

This is followup from #456

coveralls commented 10 months ago

Pull Request Test Coverage Report for Build 6774895700


Changes Missing Coverage Covered Lines Changed/Added Lines %
py/dynesty/dynesty.py 9 15 60.0%
<!-- Total: 28 34 82.35% -->
Files with Coverage Reduction New Missed Lines %
py/dynesty/nestedsamplers.py 1 91.6%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 6655377848: -0.1%
Covered Lines: 4159
Relevant Lines: 4534

💛 - Coveralls
segasai commented 9 months ago

I checked that the checkpoints from previous version will not be restored with this change. The error message https://github.com/joshspeagle/dynesty/blob/f59d963fad80301e5d28bc5a6e3718c467c1bf94/py/dynesty/utils.py#L2272
however is clear enough, so I don't consider that an issue. I'll merge this soon.