Skip to content

Commit 51e2858

Browse files
committed
[testpypi]
1 parent 22338ec commit 51e2858

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

camb/model.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -795,10 +795,7 @@ def tensor_power(self, k):
795795
return self.primordial_power(k, 2)
796796

797797
def primordial_power(self, k, ix):
798-
if np.isscalar(k):
799-
karr = np.array([k], dtype=np.float64)
800-
else:
801-
karr = np.array(k, dtype=np.float64)
798+
karr = np.ascontiguousarray([k] if np.isscalar(k) else k, dtype=np.float64)
802799
n = karr.shape[0]
803800
powers = np.empty(n)
804801
self.f_PrimordialPower(karr, powers, byref(c_int(n)), byref(c_int(ix)))

0 commit comments

Comments
 (0)