Skip to content

Commit d8b6d94

Browse files
committed
satisfy pylint
1 parent b8763da commit d8b6d94

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

py/dynesty/bounding.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,7 @@ def __init__(self, ndim, cov=None):
721721
assert detsign > 0
722722
self.logvol = logvol_prefactor(self.n) - 0.5 * detln
723723
self.funit = 1
724+
self.ctrs = [] # placeholder
724725

725726
def scale_to_logvol(self, logvol):
726727
"""Scale ball to encompass a target volume."""
@@ -987,6 +988,7 @@ def __init__(self, ndim, cov=None):
987988
assert detsign > 0
988989
self.logvol = self.n * np.log(2.) - 0.5 * detln
989990
self.funit = 1
991+
self.ctrs = []
990992

991993
def scale_to_logvol(self, logvol):
992994
"""Scale cube to encompass a target volume."""
@@ -1633,7 +1635,8 @@ def _friends_bootstrap_radius(args):
16331635
# among the resampled points using the Euclidean norm
16341636
# (i.e. "half-side-length" of n-cube).
16351637
dists = kdtree.query(points_out, k=1, eps=0, p=np.inf)[0]
1636-
1638+
else:
1639+
raise ValueError(f'Unknown type {ftype}')
16371640
# Conservative upper-bound on radius.
16381641
dist = max(dists)
16391642

@@ -1655,7 +1658,8 @@ def _friends_leaveoneout_radius(points, ftype):
16551658
elif ftype == 'cubes':
16561659
# Compute half-side-length to two nearest neighbors (self + neighbor).
16571660
dists = kdtree.query(points, k=2, eps=0, p=np.inf)[0]
1658-
1661+
else:
1662+
raise ValueError(f'unknown ftype {ftype}')
16591663
dist = dists[:, 1] # distances to LOO nearest neighbor
16601664

16611665
return dist

py/dynesty/sampler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ def _get_bound(bounding, ndim):
5252
bound = RadFriends(ndim)
5353
elif bounding == 'cubes':
5454
bound = SupFriends(ndim)
55+
else:
56+
bound = bounding
5557
return bound
5658

5759

0 commit comments

Comments
 (0)