From 5b7c3af17112cab66c70c8b81bd6f0210c87d477 Mon Sep 17 00:00:00 2001
From: MoritzThomasHuebner <email@moritz-huebner.de>
Date: Wed, 12 Sep 2018 14:31:59 +1000
Subject: [PATCH] Made sure Dynesty properly translates the number of live
 points kwarg

---
 tupak/core/sampler.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tupak/core/sampler.py b/tupak/core/sampler.py
index eca98c8d9..479e09fd3 100644
--- a/tupak/core/sampler.py
+++ b/tupak/core/sampler.py
@@ -514,14 +514,14 @@ class Dynesty(Sampler):
                              resume=True, walks=self.ndim * 5, verbose=True,
                              check_point_delta_t=60 * 10, nlive=250)
 
-        # Overwrite default values with user specified values
-        self.__kwargs.update(kwargs)
-
         # Check if nlive was instead given by another name
-        if 'nlive' not in self.__kwargs:
+        if 'nlive' not in kwargs:
             for equiv in ['nlives', 'n_live_points', 'npoint', 'npoints']:
-                if equiv in self.__kwargs:
-                    self.__kwargs['nlive'] = self.__kwargs.pop(equiv)
+                if equiv in kwargs:
+                    kwargs['nlive'] = kwargs.pop(equiv)
+
+        # Overwrite default values with user specified values
+        self.__kwargs.update(kwargs)
 
         # Set the update interval
         if 'update_interval' not in self.__kwargs:
-- 
GitLab