@@ -44,7 +44,7 @@ class InternalSampler:
4444
4545 def __init__ (self , ** kwargs ):
4646 """Initialize the internal sampler.
47-
47+
4848 Parameters
4949 ----------
5050 kwargs : dict
@@ -95,7 +95,7 @@ def prepare_sampler(self,
9595 `~numpy` array of length `ndim`.
9696 nested_sampler : `~dynesty.samplers.Sampler`
9797 The nested sampler object used to sample.
98-
98+
9999 Returns
100100 -------
101101 arglist:
@@ -116,8 +116,8 @@ def prepare_sampler(self,
116116 arg_list .append (curarg )
117117 return arg_list
118118
119- @classmethod
120- def sample (cls , args ):
119+ @staticmethod
120+ def sample (args ):
121121 """
122122 Sample a new live point.
123123
@@ -141,15 +141,15 @@ def sample(cls, args):
141141 """
142142 pass
143143
144- def tune (sample_info , update = False ):
144+ def tune (self , sampling_info , update = False ):
145145 """
146146
147- Accumulate sampling info and optionally update the proposal scale and
147+ Accumulate sampling info and optionally update the proposal scale and
148148 other tuning parameters.
149149
150150 Parameters
151151 ----------
152- sample_info : dict
152+ sampling_info : dict
153153 Dictionary containing the sampling information.
154154 update : bool
155155 Whether to update the proposal scale or not (default: False).
@@ -176,8 +176,8 @@ def prepare_sampler(self,
176176 """
177177 Prepare the list of arguments for sampling.
178178
179- This is is overriding the base class method and providing the bound itself
180- to the sampler through kwargs.
179+ This is is overriding the base class method and providing the bound
180+ itself to the sampler through kwargs.
181181
182182 """
183183 self .kwargs ['bound' ] = nested_sampler .bound
@@ -194,8 +194,8 @@ def prepare_sampler(self,
194194 loglikelihood = loglikelihood ,
195195 nested_sampler = nested_sampler )
196196
197- @classmethod
198- def sample (cls , args ):
197+ @staticmethod
198+ def sample (args ):
199199 """
200200 Return a new live point sampling uniformly within the
201201 boundary.
@@ -309,8 +309,8 @@ def prepare_sampler(self,
309309 loglikelihood = loglikelihood ,
310310 nested_sampler = nested_sampler )
311311
312- @classmethod
313- def sample (cls , args ):
312+ @staticmethod
313+ def sample (args ):
314314 """
315315 Return a new live point sampling uniformly within the
316316 boundary.
@@ -425,8 +425,8 @@ def tune(self, sampling_info, update=True):
425425 hist ['naccept' ] = 0
426426 hist ['nreject' ] = 0
427427
428- @classmethod
429- def sample (cls , args ):
428+ @staticmethod
429+ def sample (args ):
430430 """
431431 Return a new live point proposed by random walking away from an
432432 existing live point.
@@ -449,11 +449,11 @@ def sample(cls, args):
449449 Value used to scale the provided axes.
450450
451451 prior_transform : function
452- Function transforming a sample from the a unit cube to the parameter
453- space of interest according to the prior.
452+ Function transforming a sample from the a unit cube to the
453+ parameter space of interest according to the prior.
454454
455455 loglikelihood : function
456- Function returning ln(likelihood) given parameters as a 1-d
456+ Function returning ln(likelihood) given parameters as a 1-d
457457 `~numpy` array of length `ndim`.
458458
459459 kwargs : dict
@@ -498,8 +498,8 @@ def __init__(self, **kwargs):
498498 def tune (self , sampler_info , update = True ):
499499 tune_slice (self , sampler_info , update = update )
500500
501- @classmethod
502- def sample (cls , args ):
501+ @staticmethod
502+ def sample (args ):
503503 """
504504 Return a new live point proposed by a series of random slices
505505 away from an existing live point. Standard "Gibbs-like" implementation
@@ -510,8 +510,8 @@ def sample(cls, args):
510510 Parameters
511511 ----------
512512 u : `~numpy.ndarray` with shape (ndim,)
513- Position of the initial sample. **This is a copy of an existing live
514- point.**
513+ Position of the initial sample. **This is a copy of an existing
514+ live point.**
515515
516516 loglstar : float
517517 Ln(likelihood) bound.
@@ -524,12 +524,12 @@ def sample(cls, args):
524524 Value used to scale the provided axes.
525525
526526 prior_transform : function
527- Function transforming a sample from the a unit cube to the parameter
528- space of interest according to the prior.
527+ Function transforming a sample from the a unit cube to the
528+ parameter space of interest according to the prior.
529529
530530 loglikelihood : function
531- Function returning ln(likelihood) given parameters as a 1-d `~numpy`
532- array of length `ndim`.
531+ Function returning ln(likelihood) given parameters as a 1-d
532+ `~numpy` array of length `ndim`.
533533
534534 kwargs : dict
535535 A dictionary of additional method-specific parameters.
@@ -571,8 +571,8 @@ def sample(cls, args):
571571
572572 # Modifying axes and computing lengths.
573573 axes = scale * axes .T # scale based on past tuning
574- # Note we are transposing as axes[:,i] corresponds to i-th principal axis
575- # of the ellipsoid
574+ # Note we are transposing as axes[:,i] corresponds to i-th principal
575+ # axis of the ellipsoid
576576 expansion_warning_set = False
577577 # Slice sampling loop.
578578 for _ in range (slices ):
@@ -623,8 +623,8 @@ def __init__(self, **kwargs):
623623 def tune (self , sampler_info , update = True ):
624624 tune_slice (self , sampler_info , update = update )
625625
626- @classmethod
627- def sample (cls , args ):
626+ @staticmethod
627+ def sample (args ):
628628 """
629629 Return a new live point proposed by a series of random slices
630630 away from an existing live point. Standard "random" implementation
@@ -647,12 +647,12 @@ def sample(cls, args):
647647 Value used to scale the provided axes.
648648
649649 prior_transform : function
650- Function transforming a sample from the a unit cube to the parameter
651- space of interest according to the prior.
650+ Function transforming a sample from the a unit cube to the
651+ parameter space of interest according to the prior.
652652
653653 loglikelihood : function
654- Function returning ln(likelihood) given parameters as a 1-d `~numpy`
655- array of length `ndim`.
654+ Function returning ln(likelihood) given parameters as a 1-d
655+ `~numpy` array of length `ndim`.
656656
657657 kwargs : dict
658658 A dictionary of additional method-specific parameters.
0 commit comments