Пример #1
0
 def test_logsum_with_axis_3D(self):
     A = np.random.rand(10, 4, 5) + 1.0
     for axis in range(3):
         Asum = gmm.logsum(A, axis)
         assert_array_almost_equal(np.exp(Asum), np.sum(np.exp(A), axis))
Пример #2
0
 def test_logsum_with_axis_3D(self):
     A = np.random.rand(10, 4, 5) + 1.0
     for axis in range(3):
         Asum = gmm.logsum(A, axis)
         assert_array_almost_equal(np.exp(Asum), np.sum(np.exp(A), axis))
Пример #3
0
 def test_logsum_2D(self):
     A = np.random.rand(10, 4) + 1.0
     Asum = gmm.logsum(A)
     self.assertAlmostEqual(np.exp(Asum), np.sum(np.exp(A)))
Пример #4
0
 def test_logsum_2D(self):
     A = np.random.rand(10, 4) + 1.0
     Asum = gmm.logsum(A)
     self.assertAlmostEqual(np.exp(Asum), np.sum(np.exp(A)))