Skip to content

Commit

Permalink
linux [testpypi]
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Aug 19, 2024
1 parent 1bcf15c commit 30745c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions camb/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@ def luminosity_distance(self, z):
"""

if not np.isscalar(z):
z = np.asarray(z)
z = np.ascontiguousarray(z, dtype=np.float64)
return self.angular_diameter_distance(z) * (1.0 + z) ** 2

def h_of_z(self, z):
Expand All @@ -1489,7 +1489,7 @@ def h_of_z(self, z):
:return: H(z)
"""
if not np.isscalar(z):
z = np.array(z, dtype=np.float64)
z = np.ascontiguousarray(z, dtype=np.float64)
arr = np.empty(z.shape)
self.f_HofzArr(arr, z, byref(c_int(z.shape[0])))
return arr
Expand Down Expand Up @@ -1535,7 +1535,7 @@ def physical_time(self, z):
:return: t(z)/Gigayear
"""
if not np.isscalar(z):
z = np.asarray(z, dtype=np.float64)
z = np.ascontiguousarray(z, dtype=np.float64)
return self.physical_time_a1_a2(0, 1.0 / (1 + z))

def conformal_time_a1_a2(self, a1, a2):
Expand Down Expand Up @@ -1567,7 +1567,7 @@ def conformal_time(self, z, presorted=None, tol=None):
if np.isscalar(z):
redshifts = np.array([z], dtype=np.float64)
else:
redshifts = np.array(z, dtype=np.float64)
redshifts = np.asarray(z, dtype=np.float64)
if presorted is True:
redshifts = redshifts[::-1].copy()
elif presorted is None:
Expand Down

0 comments on commit 30745c2

Please sign in to comment.