Esempio n. 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))
Esempio n. 2
0
File: test_gmm.py Progetto: ronw/gm
 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))
Esempio n. 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)))
Esempio n. 4
0
File: test_gmm.py Progetto: ronw/gm
 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)))