From 0582ac4394f2e159f9e8d55c6532a079dd9f29e5 Mon Sep 17 00:00:00 2001 From: FabriTape Date: Wed, 22 Oct 2025 16:48:43 +0000 Subject: [PATCH] Change np.mat to np.asmatrix for matrix creation np.mat is not longer used in numpy --- src/specFunctions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/specFunctions.py b/src/specFunctions.py index 0f097f7..236a099 100644 --- a/src/specFunctions.py +++ b/src/specFunctions.py @@ -135,7 +135,7 @@ def savitzky_golay(y, window_size, order, deriv=0, rate=1): order_range = range(order+1) half_window = (window_size -1) // 2 # precompute coefficients - b = np.mat([[k**i for i in order_range] for k in range(-half_window, half_window+1)]) + b = np.asmatrix([[k**i for i in order_range] for k in range(-half_window, half_window+1)]) m = np.linalg.pinv(b).A[deriv] * rate**deriv * factorial(deriv) # pad the signal at the extremes with # values taken from the signal itself