def coherence(x, y, fs=1.0, window='hann', nperseg=256, noverlap=None,
              nfft=None, detrend='constant', axis=-1):

    freqs, Pxx = welch(x, fs, window, nperseg, noverlap, nfft, detrend,
                       axis=axis)
    _, Pyy = welch(y, fs, window, nperseg, noverlap, nfft, detrend, axis=axis)
    _, Pxy = csd(x, y, fs, window, nperseg, noverlap, nfft, detrend, axis=axis)

    Cxy = np.abs(Pxy)**2 / Pxx / Pyy

    return freqs, Cxy
Replace a header.
dataset/ETHPy150Open scipy/scipy/scipy/signal/spectral.py/coherence--crossover with--dataset/ETHPy150Open kleientertainment/ds_mod_tools/pkg/win32/Python27/Lib/email/message.py/Message.replace_header