Skip to content

Added steps=n logic for skipping steps #626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

alessandrofasse
Copy link

Copy link
Owner

@patrick-kidger patrick-kidger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! I like the look of this. I've left a first round of review comments. :)

Comment on lines +134 to +135
saveat = diffrax.SaveAt(steps=2)
sol = _integrate(saveat)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add tests for SaveAt(steps=n, t1=True) and SaveAt(steps=n, t1=False) when the number of steps does not divide n. Then check that in the first case with e.g. n=2 and 5 steps that we store [0 2 4 5] and in the second case we store [0 2 4]

@alessandrofasse
Copy link
Author

alessandrofasse commented May 14, 2025

Dear @patrick-kidger ,

I continued on the pull request and I could fix most of the cases. However, I am now stuck in an issue were are a couple of hours I could not find the problem.

Im shorts its about _save_t1 function. I am not able to get this right and now several tests were failing. I added the following tests, as you suggested, and I think my assert would be correct (can you cross check?)

Can you maybe assist me here a bit, I think I am misunderstanding about the logic on how states are stored and logged anlong the way.

You help would be much appreciated! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants