def _my_hilbert(x, n_fft=None, envelope=False):
 from scipy.signal import hilbert
 n_x = x.shape[(-1)]
 out = hilbert(x, N=n_fft)[:n_x]
 if (envelope is True):
  out = np.abs(out)
 return out

def _my_hilbert ( x , n_fft = None , envelope = False ) : from scipy . signal import hilbert n_x = x . shape [ ( - 1 ) ] out = hilbert ( x , N = n_fft ) [ : n_x ] if ( envelope is True ) : out = np . abs ( out ) return out
compute hilbert transform of signals w/ zero padding .