-
Notifications
You must be signed in to change notification settings - Fork 5
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
integrator instance, not class #47
Conversation
|
||
integrator = integrator_cls(self._integrator_F, **(integrator_kw or {})) | ||
ws = integrator.run(qp0, t0, t1, ts) | ||
ws = integrator_.run(self._integrator_F, qp0, t0, t1, ts) # type: ignore[arg-type] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very strange: _integrator_F
is a FCallable
. Shouldn't be erroring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is it erroring? The type checker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, mypy. Had to add the type ignore. Will need to investigate further
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
Ah, yes I think this is a good idea! |
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Fixed. And merging in. |
Instead of passing the integrator class and kwargs, you now pass an integrator instance. The integrators are equinox Modules (ie dataclasses) so the state is now reset by calling
replace
for each integration.