def test_compute_M_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.m_rad(k, p, a, b, pOnElement) zC = iops_cpp.m_rad(k, p, a, b, pOnElement) self.assertAlmostEqual(zP, zC, 6)
def test_compute_M_01(self): k = 0.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.m_rad(k, p, a, b, pOnElement) zC = iops_cpp.m_rad(k, p, a, b, pOnElement) self.assertAlmostEqual(zP, zC)