Exemplo n.º 1
0
 def test_corr_shape_mismatch(self):
     with npt.assert_raises(ValueError):
         corr(self.x, self.y)
Exemplo n.º 2
0
 def test_corr(self):
     obs = corr(self.small_mat)
     npt.assert_almost_equal(
         np.array([[1, 1, -0.94491118], [1, 1, -0.94491118],
                   [-0.94491118, -0.94491118, 1]]), obs)
Exemplo n.º 3
0
 def test_corr_shape_mismatch(self):
     with npt.assert_raises(ValueError):
         corr(self.x, self.y)
Exemplo n.º 4
0
 def test_corr(self):
     obs = corr(self.small_mat)
     npt.assert_almost_equal(
         np.array([[0.33333333, 0, -0.33333333], [0, 0, 0],
                   [-0.33333333, 0, 0.33333333]]), obs)
Exemplo n.º 5
0
 def test_corr(self):
     obs = corr(self.small_mat)
     npt.assert_almost_equal(np.array([[1, 1, -0.94491118],
                                       [1, 1, -0.94491118],
                                       [-0.94491118, -0.94491118, 1]]),
                             obs)
Exemplo n.º 6
0
 def test_corr(self):
     obs = corr(self.small_mat)
     npt.assert_almost_equal(np.array([[0.33333333, 0, -0.33333333],
                                       [0, 0, 0],
                                       [-0.33333333, 0, 0.33333333]]),
                             obs)