Doubling of the scipy.signal's bandpass filter order during the design I am trying to extract filter coefficients for a bandpass, using the &quot;scipy.signal.iirfilter&quot; function:
b, a = filt = iirfilter(
        N=2,
        btype='bandpass',
        ftype='cheby2',
        Wn=np.array([3000, 4850]) / (12400 / 2),
        rs=30,
        output='ba'
            )

b, a
Out[10]: 
(array([0.04008421, 0.04822953, 0.04776774, 0.04822953, 0.04008421]),
 array([1.        , 1.66028928, 2.34267679, 1.39001415, 0.70301997]))

Seems like the filter order is twice larger than expected. A similar task using Matlab's &quot;designfilt&quot; performs with the expected number of coefficients. What I am missing? is the filter order a fluid definition?
For lowpass, the number of the coefficients is as expected...
There is a bit of terminology confusion here.
Strictly speaking the order of the filter is the number of poles, so in your case you designed a 4th order filter.
Many software packages use the convention for bandpass/stop filters to specify the order of each slope to make it consistent with lowpass/highpass design calls. That results in a filter of twice the order.
Interestingly enough, even Matlab is inconsistent about that. designfilt('bandpassiir','FilterOrder',2, ...) will give a second order filter. butter(2,[w1 w2],...) will give you a 4th order filter.