def test_compute_L_04(self): k = 10.0 p = np.array([0.75, 0.75], dtype=np.float32) a = np.array([0.5, 1.0], dtype=np.float32) b = np.array([1.0, 0.5], dtype=np.float32) pOnElement = True zP = iops_pyx.l_rad(k, p, a, b, pOnElement) zC = iops_cpp.l_rad(k, p, a, b, pOnElement) self.assertAlmostEqual(zP, zC)
def test_compute_L_02(self): k = 10.0 p = np.array([0.3, 0.3], dtype=np.float32) a = np.array([0.5, 1.0], dtype=np.float32) b = np.array([1.0, 0.3], dtype=np.float32) pOnElement = False zP = iops_pyx.l_rad(k, self.p_off, self.a, self.b, pOnElement) zC = iops_cpp.l_rad(k, self.p_off, self.a, self.b, pOnElement) self.assertAlmostEqual(zP, zC)