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