Skip to content

Commit 126cb2f

Browse files
Aliyu kamalAliyu kamal
Aliyu kamal
authored and
Aliyu kamal
committed
Implement IIRFilter class with detailed documentation and methods for coefficient setting and sample processing
1 parent cd341e7 commit 126cb2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

audio_filters/iir_filter.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ def set_coefficients(self, a_coeffs: list[float], b_coeffs: list[float]) -> None
5252
ValueError: If the length of `a_coeffs` or `b_coeffs` does not match the order of the filter.
5353
"""
5454
if len(a_coeffs) != self.order + 1:
55-
raise ValueError(f"Expected {self.order + 1} coefficients for `a_coeffs`, got {len(a_coeffs)}")
55+
raise ValueError("Expected {} coefficients for `a_coeffs`, got {}".format(self.order + 1, len(a_coeffs)))
5656
if len(b_coeffs) != self.order + 1:
57-
raise ValueError(f"Expected {self.order + 1} coefficients for `b_coeffs`, got {len(b_coeffs)}")
57+
raise ValueError("Expected {} coefficients for `b_coeffs`, got {}".format(self.order + 1, len(b_coeffs)))
5858

5959
self.a_coeffs = a_coeffs
6060
self.b_coeffs = b_coeffs

0 commit comments

Comments
 (0)