Skip to content

Commit

Permalink
Fix return end time twice in orbit integration (#61)
Browse files Browse the repository at this point in the history
* fix error returning the end time twice

Signed-off-by: nstarman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman committed Jan 18, 2024
1 parent 604f878 commit 0536100
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/galax/integrate/_builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def run(
y0=qp0,
dt0=None,
args=(),
saveat=DiffraxSaveAt(t0=False, t1=True, ts=ts, dense=False),
saveat=DiffraxSaveAt(t0=False, t1=False, ts=ts, dense=False),
stepsize_controller=self.stepsize_controller,
**self.diffeq_kw,
)
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/potential/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,5 @@ def test_integrate_orbit(self, pot, xv):

orbit = pot.integrate_orbit(xv, t0=min(ts), t1=max(ts), ts=ts)
assert isinstance(orbit, gd.Orbit)
assert orbit.shape == (101, 7)
assert orbit.shape == (len(ts), 7)
assert xp.array_equal(orbit.t, ts)

0 comments on commit 0536100

Please sign in to comment.