From a9874f10f1ebbbe38f84170776f031aa7b711673 Mon Sep 17 00:00:00 2001 From: Tim Verbelen Date: Fri, 3 May 2024 12:44:05 +0200 Subject: [PATCH] fix max --- pymdp/control.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymdp/control.py b/pymdp/control.py index c5497964..a2379a7c 100644 --- a/pymdp/control.py +++ b/pymdp/control.py @@ -944,7 +944,7 @@ def calc_inductive_cost(qs, qs_pi, I, epsilon=1e-3): m = np.where(I[factor][:, idx] == 1)[0] # we might find no path to goal (i.e. when no goal specified) if len(m) > 0: - m = np.max(m[0]-1, 0) + m = max(m[0]-1, 0) I_m = (1-I[factor][m, :]) * np.log(epsilon) inductive_cost += I_m.dot(qs_pi[t][factor])