Skip to content

Commit

Permalink
lp_notch_test.py: minor numpy usage cleanup
Browse files Browse the repository at this point in the history
Avoids DeprecationWarning: Conversion of an array with ndim > 0 to a scalar
starting with NumPy 1.25
  • Loading branch information
ldoolitt committed Dec 20, 2024
1 parent 3111a33 commit 90903de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dsp/hosted/lp_notch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __init__(
Abp_zn = cl0_bp.response(zn)
# solve for the final gains
mat = numpy.array([[Alp_dc, Abp_dc], [Alp_zn, Abp_zn]])
target_gains = numpy.array([[self.gain], [self.ngain]])
target_gains = numpy.array([self.gain, self.ngain])
raw_gains = numpy.linalg.inv(mat).dot(target_gains)
# prevent the low-pass component from clipping
if abs(raw_gains[0]) > 0.99:
Expand Down

0 comments on commit 90903de

Please sign in to comment.