Exemplo n.º 1
0
 def test_compute_L_04(self):
     k = 10.0
     p = np.array([0.5, 0.75, 1.0], dtype=np.float32)
     a = np.array([0.0, 0.00, 0.0], dtype=np.float32)
     b = np.array([0.0, 0.10, 0.0], dtype=np.float32)
     c = np.array([0.0, 0.00, 0.1], dtype=np.float32)
     pOnElement = True
     zP = iops_pyx.l_3d(k, p, a, b, c, pOnElement)
     zC = iops_cpp.l_3d(k, p, a, b, c, pOnElement)
     self.assertAlmostEqual(zP, zC)
Exemplo n.º 2
0
 def test_compute_L_01(self):
     k = 0.0
     p = np.array([0.5, 0.75, 1.0], dtype=np.float32)
     a = np.array([0.0, 0.00, 0.0], dtype=np.float32)
     b = np.array([0.0, 0.10, 0.0], dtype=np.float32)
     c = np.array([0.0, 0.00, 0.1], dtype=np.float32)
     pOnElement = False
     zP = iops_pyx.l_3d(k, self.p_off, a, self.b, c, pOnElement)
     zC = iops_cpp.l_3d(k, self.p_off, self.a, self.b, c, pOnElement)
     self.assertAlmostEqual(zP, zC)