From 4509ea20288f4b1d1158a76caa3f13f78c2a0a39 Mon Sep 17 00:00:00 2001 From: himkwtn Date: Mon, 19 Aug 2024 17:04:00 -0700 Subject: [PATCH] BUG: fix l0 reg --- pysindy/utils/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysindy/utils/base.py b/pysindy/utils/base.py index 415fd483..ea3cba62 100644 --- a/pysindy/utils/base.py +++ b/pysindy/utils/base.py @@ -232,7 +232,7 @@ def get_prox( def regularization_l0(x: NDArray[np.float64], lam: NDArray[np.float64]): - return lam.item() * np.count_nonzero(x) + return lam * np.count_nonzero(x) def regualization_weighted_l0(x: NDArray[np.float64], lam: NDArray[np.float64]):