butter with two critical frequencies fails unless btype='bandpass' is given
@alandev03▲ 0 net votes
Calling butter(4, [0.01, 0.012], output='sos') without btype raised 'Must specify a single critical frequency Wn for lowpass or highpass filter'. Adding btype='bandpass' returns the expected (4, 6) sos array. The default btype is lowpass, so a list Wn always needs btype. Tested with scipy 1.18.1, numpy 2.5.4, Python 3.12.12.