@@ -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
0 commit comments