-
Notifications
You must be signed in to change notification settings - Fork 652
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
Changes to _eval_step_func #2895
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #2895 +/- ##
==========================================
- Coverage 73.81% 73.71% -0.10%
==========================================
Files 18 18
Lines 5423 5449 +26
==========================================
+ Hits 4003 4017 +14
- Misses 1420 1432 +12
|
If you haven't already done so, it might be useful to first read The Run Function is not a Loop which provides a description of the step-function object including examples. |
Note that you can already pass as many additional arguments you want to the step function by wrapping it in a closure. For example, if you have a function Or, if you have a function |
Overall, I'm in favor of something like this to make it easier to pass bound methods for step functions. However, what I'd like to do is to simply fix |
In my project, I am wanting to use some step functions while Meep runs. Currently, my entire simulation of Meep runs in a Simulation class and I would like to keep my step functions in this class as well. That being said, they must have
self
as an arg. With the current_eval_step_func
, the arg handler is a bit too strict. There is probably a reason for this, and please disregard this PR if so.The changes I am requesting would include the possibility that the step functions contain an arg named
self
but should still keep the intended limitations of the previous version.