예제 #1
0
 def test_corr_shape_mismatch(self):
     with npt.assert_raises(ValueError):
         corr(self.x, self.y)
예제 #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)
예제 #3
0
 def test_corr_shape_mismatch(self):
     with npt.assert_raises(ValueError):
         corr(self.x, self.y)
예제 #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)
예제 #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)
예제 #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)