diff --git a/abcvoting/generate.py b/abcvoting/generate.py index f6bffd1..52e04d2 100644 --- a/abcvoting/generate.py +++ b/abcvoting/generate.py @@ -886,11 +886,11 @@ def __init__(self, name, center_point=0.5, sigma=0.15, width=1.0): try: len(center_point) - self.center_point = np.array(center_point) + self.center_point = np.array(center_point, dtype=float) if len(self.center_point) != self.dimension: raise ValueError("Center point has a wrong dimension.") except TypeError: - self.center_point = np.array([center_point] * self.dimension) + self.center_point = np.array([center_point] * self.dimension, dtype=float) def prefsampling_function(self): if self.name == "1d_interval":