From f6707a4671b062891aac36f39e17d2e0d210b6d7 Mon Sep 17 00:00:00 2001 From: Yuichi Motoyama Date: Tue, 20 Aug 2024 14:58:39 +0900 Subject: [PATCH] fix history.load --- physbo/search/discrete/results.py | 4 ++-- physbo/search/discrete_multi/results.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/physbo/search/discrete/results.py b/physbo/search/discrete/results.py index f925830b..75651989 100644 --- a/physbo/search/discrete/results.py +++ b/physbo/search/discrete/results.py @@ -183,8 +183,8 @@ def load(self, filename): """ data = np.load(filename) - M = data["num_runs"] - N = data["total_num_search"] + M = int(data["num_runs"]) + N = int(data["total_num_search"]) self.num_runs = M self.total_num_search = N self.fx[0:N] = data["fx"] diff --git a/physbo/search/discrete_multi/results.py b/physbo/search/discrete_multi/results.py index 96288a86..c711fd42 100644 --- a/physbo/search/discrete_multi/results.py +++ b/physbo/search/discrete_multi/results.py @@ -118,8 +118,8 @@ def load(self, filename): with open(filename, "rb") as f: data = pickle.load(f) - M = data["num_runs"] - N = data["total_num_search"] + M = int(data["num_runs"]) + N = int(data["total_num_search"]) self.num_runs = M self.total_num_search = N self.fx[0:N] = data["fx"]