Skip to content

Commit

Permalink
removing old ValueError (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Jun 27, 2021
1 parent d2f8f46 commit 10b4ec3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/exoplanet/orbits/keplerian.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ def __init__(
self.cos_incl = tt.cos(self.incl)
self.b = self.cos_incl / self.dcosidb
elif duration is not None:
if self.ecc is None:
raise ValueError(
"fitting with duration only works for eccentric orbits"
)
# This assertion should never be hit because of the first
# conditional in this method, but let's keep it here anyways
assert self.ecc is not None

self.duration = as_tensor_variable(to_unit(duration, u.day))
c = tt.sin(np.pi * self.duration * incl_factor / self.period)
c2 = c * c
Expand Down

0 comments on commit 10b4ec3

Please sign in to comment.