File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 66import jax_cosmo .background as bkgrd
77from jax_cosmo import Cosmology
88
9+
910def test_H ():
10- # We first define equivalent CCL and jax_cosmo cosmologies
11+ # We first define equivalent CCL and jax_cosmo cosmologies
1112 cosmo_ccl = ccl .Cosmology (
1213 Omega_c = 0.3 ,
1314 Omega_b = 0.05 ,
@@ -17,7 +18,7 @@ def test_H():
1718 Neff = 0 ,
1819 transfer_function = "eisenstein_hu" ,
1920 matter_power_spectrum = "linear" ,
20- wa = 2. # non-zero wa
21+ wa = 2.0 , # non-zero wa
2122 )
2223
2324 cosmo_jax = Cosmology (
@@ -28,15 +29,16 @@ def test_H():
2829 n_s = 0.96 ,
2930 Omega_k = 0.0 ,
3031 w0 = - 1.0 ,
31- wa = 2.0 , # non-zero wa
32+ wa = 2.0 , # non-zero wa
3233 )
3334
3435 # Test array of scale factors
3536 a = np .linspace (0.01 , 1.0 )
3637
3738 H_ccl = ccl .h_over_h0 (cosmo_ccl , a )
38- H_jax = bkgrd .H (cosmo_jax , a ) / 100.
39- assert_allclose (H_ccl , H_jax , rtol = 1.e-3 )
39+ H_jax = bkgrd .H (cosmo_jax , a ) / 100.0
40+ assert_allclose (H_ccl , H_jax , rtol = 1.0e-3 )
41+
4042
4143def test_distances_flat ():
4244 # We first define equivalent CCL and jax_cosmo cosmologies
You can’t perform that action at this time.
0 commit comments