@pytest.mark.skipif(u'not HAS_SCIPY')
def test_efunc_vs_invefunc_flrw():
 z0 = 0.5
 z = np.array([0.5, 1.0, 2.0, 5.0])
 cosmo = test_cos_sub()
 assert allclose(cosmo.efunc(z0), (1.0 / cosmo.inv_efunc(z0)))
 assert allclose(cosmo.efunc(z), (1.0 / cosmo.inv_efunc(z)))
 cosmo = test_cos_subnu()
 assert allclose(cosmo.efunc(z0), (1.0 / cosmo.inv_efunc(z0)))
 assert allclose(cosmo.efunc(z), (1.0 / cosmo.inv_efunc(z)))

@ pytest . mark . skipif ( u'not HAS_SCIPY' ) def test_efunc_vs_invefunc_flrw ( ) : z0 = 0.5 z = np . array ( [ 0.5 , 1.0 , 2.0 , 5.0 ] ) cosmo = test_cos_sub ( ) assert allclose ( cosmo . efunc ( z0 ) , ( 1.0 / cosmo . inv_efunc ( z0 ) ) ) assert allclose ( cosmo . efunc ( z ) , ( 1.0 / cosmo . inv_efunc ( z ) ) ) cosmo = test_cos_subnu ( ) assert allclose ( cosmo . efunc ( z0 ) , ( 1.0 / cosmo . inv_efunc ( z0 ) ) ) assert allclose ( cosmo . efunc ( z ) , ( 1.0 / cosmo . inv_efunc ( z ) ) )
test that efunc and inv_efunc give inverse values .