def cwt(X, Ws, use_fft=True, mode='same', decim=1):
    n_signals, n_times = X[:, ::decim].shape

    coefs = _cwt(X, Ws, mode, decim=decim, use_fft=use_fft)

    tfrs = np.empty((n_signals, len(Ws), n_times), dtype=np.complex)
    for k, tfr in enumerate(coefs):
        tfrs[k] = tfr

    return tfrs
Compute time freq decomposition with continuous wavelet transform
dataset/ETHPy150Open mne-tools/mne-python/mne/time_frequency/tfr.py/cwt