Skip to content

Commit 30745c2

Browse files
committed
linux [testpypi]
1 parent 1bcf15c commit 30745c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

camb/results.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ def luminosity_distance(self, z):
14731473
"""
14741474

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

14791479
def h_of_z(self, z):
@@ -1489,7 +1489,7 @@ def h_of_z(self, z):
14891489
:return: H(z)
14901490
"""
14911491
if not np.isscalar(z):
1492-
z = np.array(z, dtype=np.float64)
1492+
z = np.ascontiguousarray(z, dtype=np.float64)
14931493
arr = np.empty(z.shape)
14941494
self.f_HofzArr(arr, z, byref(c_int(z.shape[0])))
14951495
return arr
@@ -1535,7 +1535,7 @@ def physical_time(self, z):
15351535
:return: t(z)/Gigayear
15361536
"""
15371537
if not np.isscalar(z):
1538-
z = np.asarray(z, dtype=np.float64)
1538+
z = np.ascontiguousarray(z, dtype=np.float64)
15391539
return self.physical_time_a1_a2(0, 1.0 / (1 + z))
15401540

15411541
def conformal_time_a1_a2(self, a1, a2):
@@ -1567,7 +1567,7 @@ def conformal_time(self, z, presorted=None, tol=None):
15671567
if np.isscalar(z):
15681568
redshifts = np.array([z], dtype=np.float64)
15691569
else:
1570-
redshifts = np.array(z, dtype=np.float64)
1570+
redshifts = np.asarray(z, dtype=np.float64)
15711571
if presorted is True:
15721572
redshifts = redshifts[::-1].copy()
15731573
elif presorted is None:

0 commit comments

Comments
 (0)