Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Feb 15, 2024
1 parent 59a7313 commit 8ed4261
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions py/dynesty/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,12 @@ def __init__(self,
# random state
self.rstate = rstate

# set to none just for qa
self.scale = None
if callable(sampling):
_SAMPLING["user-defined"] = sampling
sampling = "user-defined"

self.kwargs = {}
# Initialize method to "evolve" a point to a new position.
self.sampling = sampling
self.evolve_point = _SAMPLING[sampling]

# parallelism
self.pool = pool # provided pool
Expand Down Expand Up @@ -172,12 +171,10 @@ def __init__(self,
self.plateau_mode = False
self.plateau_counter = None
self.plateau_logdvol = None

# results
self.saved_run = RunRecord()

# Initialize method to "evolve" a point to a new position.
self.sampling, self.evolve_point = sampling, _SAMPLING[sampling]

# Initialize heuristic used to update our sampling method.
self._UPDATE = {
'unif': self.update_unif,
Expand All @@ -191,7 +188,6 @@ def __init__(self,
self.scale = 1.

self.kwargs = kwargs or {}
# please use self.kwargs below

self.custom_update = self.kwargs.get('update_func')
self.update_proposal = self._UPDATE.get(sampling, self.update_user)
Expand Down

0 comments on commit 8ed4261

Please sign in to comment.