From 74c2a20c4bb4a78b4b3b849d0e542927cfcbb146 Mon Sep 17 00:00:00 2001
From: Moritz Huebner <email@moritz-huebner.de>
Date: Thu, 15 Oct 2020 13:55:53 +1100
Subject: [PATCH] Now passes an array.array object in the Cpnest livepoint
 constructor

---
 bilby/core/sampler/cpnest.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bilby/core/sampler/cpnest.py b/bilby/core/sampler/cpnest.py
index 611219e7..25183bd0 100644
--- a/bilby/core/sampler/cpnest.py
+++ b/bilby/core/sampler/cpnest.py
@@ -1,5 +1,6 @@
 from __future__ import absolute_import
 
+import array
 import copy
 
 import numpy as np
@@ -88,8 +89,8 @@ class Cpnest(NestedSampler):
                 prior_samples = self.priors.sample()
                 self._update_bounds()
                 point = LivePoint(
-                    self.names, [prior_samples[name]
-                                 for name in self.names])
+                    self.names, array.array(
+                        'f', [prior_samples[name] for name in self.names]))
                 return point
 
         self._resolve_proposal_functions()
-- 
GitLab