예제 #1
0
def test_rfft_freq_execution(setup):
    t = rfftfreq(20, .1, chunk_size=6)

    res = t.execute().fetch()
    np.testing.assert_allclose(res, np.fft.rfftfreq(20, .1))

    t = rfftfreq(21, .01, chunk_size=6)

    res = t.execute().fetch()
    np.testing.assert_allclose(res, np.fft.rfftfreq(21, .01))
예제 #2
0
    def testRFFTFreqExecution(self):
        t = rfftfreq(20, .1, chunk_size=3)

        res = self.executor.execute_tensor(t, concat=True)[0]
        np.testing.assert_allclose(res, np.fft.rfftfreq(20, .1))

        t = rfftfreq(21, .01, chunk_size=3)

        res = self.executor.execute_tensor(t, concat=True)[0]
        np.testing.assert_allclose(res, np.fft.rfftfreq(21, .01))
예제 #3
0
    def testFFTFreq(self):
        t = fftfreq(10, .1, chunk_size=3)

        self.assertEqual(t.shape, np.fft.fftfreq(10, .1).shape)
        t.tiles()
        self.assertEqual(t.shape, tuple(sum(ns) for ns in t.nsplits))

        t = rfftfreq(10, .1, chunk_size=3)

        self.assertEqual(t.shape, np.fft.rfftfreq(10, .1).shape)
        t.tiles()
        self.assertEqual(t.shape, tuple(sum(ns) for ns in t.nsplits))
예제 #4
0
파일: test_fft.py 프로젝트: fyrestone/mars
def test_fft_freq():
    t = fftfreq(10, .1, chunk_size=3)

    assert t.shape == np.fft.fftfreq(10, .1).shape
    t = tile(t)
    assert t.shape == tuple(sum(ns) for ns in t.nsplits)

    t = rfftfreq(10, .1, chunk_size=3)

    assert t.shape == np.fft.rfftfreq(10, .1).shape
    t = tile(t)
    assert t.shape == tuple(sum(ns) for ns in t.nsplits)