fisspy/analysis/wavelet.py
def _fastConv(f, g, nt):
    """
    Fast convolution two given function f and g (method 1)
    """
    nf=f.shape
    ng=g.shape
    npad=2**(int(np.log2(max([nf[1],ng[1]])))+1)
    wh1=np.arange(nf[0],dtype=int)
    wh2=np.arange(nf[1],dtype=int)*np.ones((nf[0],1),dtype=int)-(nt.astype(int)-1)//2-1
    pf=np.zeros([nf[0],npad],dtype=complex)
    pg=np.zeros([nf[0],npad],dtype=complex)
    pf[:,:nf[1]]=f
    pg[:,:ng[1]]=g
    conv=ifft(fft(pf)*fft(pg[:,::-1]))
    result=conv[wh1,wh2.T].T
    return result

    Fast convolution two given function f and g (method 1)
    
Fast convolution two given function f and g (method 1)
Fast convolution two given function f and g ( method 1 )
def _fastConv(f, g, nt):
    nf=f.shape
    ng=g.shape
    npad=2**(int(np.log2(max([nf[1],ng[1]])))+1)
    wh1=np.arange(nf[0],dtype=int)
    wh2=np.arange(nf[1],dtype=int)*np.ones((nf[0],1),dtype=int)-(nt.astype(int)-1)//2-1
    pf=np.zeros([nf[0],npad],dtype=complex)
    pg=np.zeros([nf[0],npad],dtype=complex)
    pf[:,:nf[1]]=f
    pg[:,:ng[1]]=g
    conv=ifft(fft(pf)*fft(pg[:,::-1]))
    result=conv[wh1,wh2.T].T
    return result
def _fastConv ( f , g , nt ) : nf = f . shape ng = g . shape npad = 2 ** ( int ( np . log2 ( max ( [ nf [ 1 ] , ng [ 1 ] ] ) ) ) + 1 ) wh1 = np . arange ( nf [ 0 ] , dtype = int ) wh2 = np . arange ( nf [ 1 ] , dtype = int ) * np . ones ( ( nf [ 0 ] , 1 ) , dtype = int ) - ( nt . astype ( int ) - 1 ) // 2 - 1 pf = np . zeros ( [ nf [ 0 ] , npad ] , dtype = complex ) pg = np . zeros ( [ nf [ 0 ] , npad ] , dtype = complex ) pf [ : , : nf [ 1 ] ] = f pg [ : , : ng [ 1 ] ] = g conv = ifft ( fft ( pf ) * fft ( pg [ : , : : - 1 ] ) ) result = conv [ wh1 , wh2 . T ] . T return result
Fast convolution two given function f and g (method 1)
Fast convolution two given function f and g ( method 1 )
"""
    Fast convolution two given function f and g (method 1)
    """
f
g
nt