@@ -1473,7 +1473,7 @@ def luminosity_distance(self, z):
1473
1473
"""
1474
1474
1475
1475
if not np .isscalar (z ):
1476
- z = np .asarray ( z )
1476
+ z = np .ascontiguousarray ( z , dtype = np . float64 )
1477
1477
return self .angular_diameter_distance (z ) * (1.0 + z ) ** 2
1478
1478
1479
1479
def h_of_z (self , z ):
@@ -1489,7 +1489,7 @@ def h_of_z(self, z):
1489
1489
:return: H(z)
1490
1490
"""
1491
1491
if not np .isscalar (z ):
1492
- z = np .array (z , dtype = np .float64 )
1492
+ z = np .ascontiguousarray (z , dtype = np .float64 )
1493
1493
arr = np .empty (z .shape )
1494
1494
self .f_HofzArr (arr , z , byref (c_int (z .shape [0 ])))
1495
1495
return arr
@@ -1535,7 +1535,7 @@ def physical_time(self, z):
1535
1535
:return: t(z)/Gigayear
1536
1536
"""
1537
1537
if not np .isscalar (z ):
1538
- z = np .asarray (z , dtype = np .float64 )
1538
+ z = np .ascontiguousarray (z , dtype = np .float64 )
1539
1539
return self .physical_time_a1_a2 (0 , 1.0 / (1 + z ))
1540
1540
1541
1541
def conformal_time_a1_a2 (self , a1 , a2 ):
@@ -1567,7 +1567,7 @@ def conformal_time(self, z, presorted=None, tol=None):
1567
1567
if np .isscalar (z ):
1568
1568
redshifts = np .array ([z ], dtype = np .float64 )
1569
1569
else :
1570
- redshifts = np .array (z , dtype = np .float64 )
1570
+ redshifts = np .asarray (z , dtype = np .float64 )
1571
1571
if presorted is True :
1572
1572
redshifts = redshifts [::- 1 ].copy ()
1573
1573
elif presorted is None :
0 commit comments