joshspeagle / dynesty

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

6x speed up within() method of multiellipsoid #329

Closed segasai closed 3 years ago

segasai commented 3 years ago

Speeds up this by a factor of 6

import dynesty.bounding as db
import numpy as np

sig = np.identity(10)
cens = [(np.arange(10) == i).astype(int) for i in range(10)]
ells = db.MultiEllipsoid([db.Ellipsoid(xcen, sig) for xcen in cens])
x0 = np.zeros(10)
for i in range(1000000):
    ells.within(x0)
coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 1219412557


Changes Missing Coverage Covered Lines Changed/Added Lines %
py/dynesty/bounding.py 4 5 80.0%
<!-- Total: 8 9 88.89% -->
Totals Coverage Status
Change from base Build 1207209309: -0.004%
Covered Lines: 3393
Relevant Lines: 4149

💛 - Coveralls