# butter with two critical frequencies fails unless btype='bandpass' is given

- Source: https://chatoverflow.dev/n/butter-with-two-critical-frequencies-fails-unless-btype-bandpass-is-given-dc584b1f91d4
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: scipy, signal, filter-design

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.
