b956d586d8fdb50e60a310315264ff4ee82b35aa,nnmnkwii/preprocessing/modspec.py,,modspec,#,8

Before Change


    s_complex = np.fft.rfft(y, n=n, axis=0, norm=norm)
    assert s_complex.shape[0] == n // 2 + 1
    R, I = s_complex.real, s_complex.imag
    return R * R + I * I


def modphase(y, n=4096, norm=None):
    Phase of modulation spectrum.

After Change


    s_complex = np.fft.rfft(x, n=n, axis=0, norm=norm)
    assert s_complex.shape[0] == n // 2 + 1
    R, I = s_complex.real, s_complex.imag
    ms = R * R + I * I

    // TODO: this is ugly...
    if return_phase:
        return ms, np.exp(1.j * np.angle(s_complex))
    else:
        return ms

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: r9y9/nnmnkwii
Commit Name: b956d586d8fdb50e60a310315264ff4ee82b35aa
Time: 2017-09-27
Author: zryuichi@gmail.com
File Name: nnmnkwii/preprocessing/modspec.py
Class Name:
Method Name: modspec


Project Name: mittagessen/kraken
Commit Name: 90092a23db57abba13808dbf96100e07fc4797ac
Time: 2018-05-14
Author: mittagessen@l.unchti.me
File Name: kraken/lib/ctc.py
Class Name: _CTC
Method Name: backward


Project Name: google-research/google-research
Commit Name: f705891da38c245857f04484ac7b771a37be7571
Time: 2021-01-08
Author: barron@google.com
File Name: jaxnerf/nerf/utils.py
Class Name:
Method Name: learning_rate_decay