Skip to content

Commit 560b041

Browse files
committed
one_time.ipynb: Python 3 compatibility
1 parent d36085c commit 560b041

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

notebooks/one_time.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"M.set(common_settings)\n",
9696
"M.compute()\n",
9797
"derived = M.get_current_derived_parameters(['z_rec','tau_rec','conformal_age'])\n",
98-
"#print derived.viewkeys()\n",
98+
"#print(derived.keys())\n",
9999
"z_rec = derived['z_rec']\n",
100100
"z_rec = int(1000.*z_rec)/1000. # round down at 4 digits after coma\n",
101101
"M.struct_cleanup() # clean output\n",
@@ -111,7 +111,7 @@
111111
"# load transfer functions at recombination\n",
112112
"#\n",
113113
"one_time = M.get_transfer(z_rec)\n",
114-
"print one_time.viewkeys()\n",
114+
"print(one_time.keys())\n",
115115
"k = one_time['k (h/Mpc)']\n",
116116
"Theta0 = 0.25*one_time['d_g']\n",
117117
"phi = one_time['phi']\n",
@@ -129,7 +129,7 @@
129129
"# Hubble crossing (k = 2 pi a H), sound horizon crossing (k = 2pi / rs)\n",
130130
"#\n",
131131
"background = M.get_background() # load background table\n",
132-
"#print background.viewkeys()\n",
132+
"#print(background.keys())\n",
133133
"#\n",
134134
"background_tau = background['conf. time [Mpc]'] # read confromal times in background table\n",
135135
"background_z = background['z'] # read redshift\n",

0 commit comments

Comments
 (0)