def test_real_spectrum(self):
        x = np.zeros(16)
        x[0] = 1
        f, p = periodogram(x, scaling='spectrum')
        g, q = periodogram(x, scaling='density')
        assert_allclose(f, np.linspace(0, 0.5, 9))
        assert_allclose(p, q/16.0)
dataset/ETHPy150Open scipy/scipy/scipy/signal/tests/test_spectral.py/TestPeriodogram.test_real_spectrum/original