Skip to content

Commit 5babb28

Browse files
committed
Tackle a few warnings
1 parent 19d2b15 commit 5babb28

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/tranquilo/visualize.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def visualize_tranquilo(results, iterations):
8484
result = results[case]
8585
iteration = iterations[case]
8686
state = result.algorithm_output["states"][iteration]
87-
params_history = np.array(result.history["params"])
88-
criterion_history = np.array(result.history["criterion"])
87+
params_history = np.array(result.history.params)
88+
criterion_history = np.array(result.history.fun)
8989
fig = _plot_sample_points(
9090
params_history, state, color_dict, fig, row=1, col=i + 1
9191
)
@@ -320,7 +320,7 @@ def _plot_fekete_criterion(res, fig, row, col, iteration):
320320

321321
def _plot_clusters_points_ratio(res, iteration, fig, row, col):
322322
dim = res.params.shape[0]
323-
history = np.array(res.history["params"])
323+
history = np.array(res.history.params)
324324
states = res.algorithm_output["states"]
325325
colors = [
326326
"rgb(251,106,74)",
@@ -423,7 +423,7 @@ def _plot_distances_from_center(history, state, fig, col, rows):
423423

424424
def _get_fekete_criterion(res):
425425
states = res.algorithm_output["states"][1:]
426-
history = np.array(res.history["params"])
426+
history = np.array(res.history.params)
427427

428428
out = [np.nan] + [
429429
log_d_quality_calculator(
@@ -517,7 +517,7 @@ def disable_legend_if_duplicate(trace):
517517
def _process_results(result):
518518
"""Add model indices to states of optimization result."""
519519
result = deepcopy(result)
520-
xs = np.array(result.history["params"])
520+
xs = np.array(result.history.params)
521521
if result.algorithm in ["nag_pybobyqa", "nag_dfols"]:
522522
for i in range(1, len(result.algorithm_output["states"])):
523523
state = result.algorithm_output["states"][i]

0 commit comments

Comments
 (0)