Skip to content

Commit

Permalink
Make Cosmology.k jitable
Browse files Browse the repository at this point in the history
  • Loading branch information
eelregit committed Jan 20, 2022
1 parent 3e45de0 commit cf8500c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions jax_cosmo/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,7 @@ def Omega_k(self):

@property
def k(self):
if self.Omega > 1.0: # Closed universe
k = 1
elif self.Omega == 1.0: # Flat universe
k = 0
elif self.Omega < 1.0: # Open Universe
k = -1
return k
return -np.sign(self._Omega_k).astype(np.int8)

@property
def sqrtk(self):
Expand Down

0 comments on commit cf8500c

Please sign in to comment.