Skip to content

Commit f6707a4

Browse files
committed
fix history.load
1 parent e9ab4e3 commit f6707a4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

physbo/search/discrete/results.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ def load(self, filename):
183183
184184
"""
185185
data = np.load(filename)
186-
M = data["num_runs"]
187-
N = data["total_num_search"]
186+
M = int(data["num_runs"])
187+
N = int(data["total_num_search"])
188188
self.num_runs = M
189189
self.total_num_search = N
190190
self.fx[0:N] = data["fx"]

physbo/search/discrete_multi/results.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ def load(self, filename):
118118
with open(filename, "rb") as f:
119119
data = pickle.load(f)
120120

121-
M = data["num_runs"]
122-
N = data["total_num_search"]
121+
M = int(data["num_runs"])
122+
N = int(data["total_num_search"])
123123
self.num_runs = M
124124
self.total_num_search = N
125125
self.fx[0:N] = data["fx"]

0 commit comments

Comments
 (0)