Exemplo n.º 1
0
    def test_wpe_v0_vs_v7(self):
        desired = wpe.wpe_v0(self.Y,
                             self.K,
                             self.delay,
                             statistics_mode='full')
        actual = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='full')
        tc.assert_allclose(actual, desired, atol=1e-10)

        desired = wpe.wpe_v0(self.Y,
                             self.K,
                             self.delay,
                             statistics_mode='valid')
        actual = wpe.wpe_v7(self.Y,
                            self.K,
                            self.delay,
                            statistics_mode='valid')
        tc.assert_allclose(actual, desired, atol=1e-10)

        desired = wpe.wpe_v6(self.Y,
                             self.K,
                             self.delay,
                             statistics_mode='valid')
        actual = wpe.wpe_v7(self.Y, self.K, self.delay, statistics_mode='full')
        tc.assert_raises(AssertionError, tc.assert_array_equal, desired,
                         actual)
Exemplo n.º 2
0
    def test_wpe_multi_freq(self):
        desired = wpe.wpe_v0(self.Y,
                             self.K,
                             self.delay,
                             statistics_mode='full')
        desired = [desired, desired]
        actual = wpe.wpe_v0(np.array([self.Y, self.Y]),
                            self.K,
                            self.delay,
                            statistics_mode='full')
        tc.assert_allclose(actual, desired, atol=1e-6)

        desired = wpe.wpe_v7(self.Y,
                             self.K,
                             self.delay,
                             statistics_mode='full')
        desired = [desired, desired]
        actual = wpe.wpe_v7(np.array([self.Y, self.Y]),
                            self.K,
                            self.delay,
                            statistics_mode='full')
        tc.assert_allclose(actual, desired, atol=1e-6)

        desired = wpe.wpe_v6(self.Y,
                             self.K,
                             self.delay,
                             statistics_mode='full')
        desired = [desired, desired]
        actual = wpe.wpe_v6(np.array([self.Y, self.Y]),
                            self.K,
                            self.delay,
                            statistics_mode='full')
        tc.assert_allclose(actual, desired, atol=1e-6)

        desired = wpe.wpe_v8(self.Y,
                             self.K,
                             self.delay,
                             statistics_mode='full')
        desired = [desired, desired]
        actual = wpe.wpe_v8(np.array([self.Y, self.Y]),
                            self.K,
                            self.delay,
                            statistics_mode='full')
        tc.assert_allclose(actual, desired, atol=1e-6)