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

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