コード例 #1
0
    def test_coherence_fails_if_data2_not_lc(self):
        data = np.array([[1,2,3,4,5],[2,3,4,5,1]])

        with pytest.raises(TypeError):
            coh = coherence(data, self.lc2)
コード例 #2
0
    def test_coherence_computes_correctly(self):

        coh = coherence(self.lc1, self.lc2)

        assert len(coh) == 2
        assert np.abs(np.mean(coh)) < 1
コード例 #3
0
    def test_coherence_computes_correctly(self):
        with pytest.warns(UserWarning) as record:
            coh = coherence(self.lc1, self.lc2)

        assert len(coh) == 2
        assert np.abs(np.mean(coh)) < 1
コード例 #4
0
 def test_coherence_runs(self):
     coh = coherence(self.lc1, self.lc2)
コード例 #5
0
 def test_coherence_runs(self):
     with pytest.warns(UserWarning) as record:
         coh = coherence(self.lc1, self.lc2)
コード例 #6
0
    def test_coherence_computes_correctly(self):

        coh = coherence(self.lc1, self.lc2)

        assert len(coh) == 2
        assert np.abs(np.mean(coh)) < 1
コード例 #7
0
    def test_coherence_fails_if_data2_not_lc(self):
        data = np.array([[1,2,3,4,5],[2,3,4,5,1]])

        with pytest.raises(AssertionError):
            coh = coherence(data, self.lc2)
コード例 #8
0
 def test_coherence_runs(self):
     coh = coherence(self.lc1, self.lc2)
コード例 #9
0
    def test_coherence_fails_if_data1_not_lc(self):
        data = np.array([[1,2,3,4,5],[2,3,4,5,1]])

        with pytest.raises(TypeError):
            coh = coherence(self.lc1, data)