Can't implement correctly Python IIR and FIR Filters I'm trying to implement 2 lowpass filters and see the difference between them from plots( one FIR filter that needs to be designed with the Hann window method and another IIR filter using Chebyshev type I). The problem is that I can't make 2 correct plots to see the difference between them and I don't know exactly if they are correctly implemented...I have fc1,fc2, ft, rp and rs as parameters. Here it's my python code:

 import matplotlib.pyplot as plt
 import scipy.signal as signal
 import numpy as np

def plotInTime(x,fs):
    t=np.arange(0,np.size(x,0)/fs,1/fs)
    plt.figure()
    plt.plot(t,x)
    plt.xlabel('Time (s)')
    plt.ylabel('Amplitude')
    plt.grid(True)

def plotInFrequency(x,fs):
    N=int(np.size(x,0)/2)
    if np.size(x,0)==1:
        X=np.fft.fft(x,axis=1)
    else:
        X=np.fft.fft(x,axis=0)
    X=np.abs(X)
    X=X[:N]
    f=np.arange(0,fs/2,fs/2/N)
    plt.figure()
    plt.plot(f,X)
    plt.xlabel('Frequency (Hz)')
    plt.ylabel('Magnitude')
    plt.grid(True) 

fs, x = readWav('Ring05c.wav')

plt.close('all')
plt.figure(figsize=[12,12])
plt.subplot(3,2,1)
plotInTime(x,fs)
plt.title('Original Signal')
plt.subplot(3,2,2)
myDSP.plotInFrequency(x,fs)
plt.title('Spectrum for the Original Signal')

fc1=1200
fc2=3000
fc= np.arange(fc1,fc2+1)
ft=150
rp=0.1
rs=40
t = np.linspace(-1, 1, 201)
L, Wn = signal.cheb1ord(fc1/(fs/2), fc2/(fs/2), rp, rs);
b, a = signal.cheby1(L, 1, Wn,'low')
h = signal.lfilter(b, a,x,axis=0)
plotInFrequnecy(h,fs)
w=signal.hann(65) #idk what to do after this
Right now I have an error that says: Error: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

    import myDSP
        import matplotlib.pyplot as plt
        import scipy.signal as signal
        import numpy as np


        fs, x = myDSP.readWav('Ring05c.wav')



        fc1=1200
        fc2=3000
        fc= np.arange(fc1,fc2+1)
        ft=150
        rp=0.1
        rs=40
        t = np.linspace(-1, 1, 201)
        #x = (np.sin(2*np.pi*0.75*t*(1-t) + 2.1)+0.1*np.sin(2*np.pi*1.25*t + 1) +0.18*np.cos(2*np.pi*3.85*t))
wp=np.array([fc-ft/2])/(fs/2)
ws=np.array([fc+ft/2])/(fs/2)
        L, Wn = signal.cheb1ord(wp,ws, rp, rs);
        b, a = signal.cheby1(L, rp, Wn,'low')
        f,H=signal.freqz(b,a,worN=256,plot=None,fs=fs)
        plt.plot(b,'.-b',label='b coefficients')
        plt.plot(a,'.-r',label='a coefficients')
        plt.legend()


        #h = signal.lfilter(b, a,x,axis=0)
        #w=signal.hann(65)