-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
ENH: Argument for Optional Mutation on Function Discretize #519
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #519 +/- ##
===========================================
+ Coverage 71.99% 72.20% +0.20%
===========================================
Files 56 56
Lines 9374 9376 +2
===========================================
+ Hits 6749 6770 +21
+ Misses 2625 2606 -19 ☔ View full report in Codecov by Sentry. |
I will work on the codecov report later. |
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.
Well done, I don't see any breaking changes happening here.
It would be nice to include tests for 2-D functions.
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.
LGTM
@phmbressan do you know what is happening with the GitHub actions here? |
There was one test that oddly failed on first pass forcing the others to be run manually. |
a445f6e
to
9b20258
Compare
…' into enh/optional-discretize-mutation
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest --runslow
) have passed locallyCHANGELOG.md
has been updated (if relevant)Current behavior
The behavior of
Function.set_discrete
is well documented, but not exactly intuitive: the originalFunction
is always mutated. This may not always be the need of the user and it has caused problems before in development, such as #514 .New behavior
This PR adds a new optional parameter (whose default does not call a breaking change) so that it may be specified whether the
self
should be discretized.Tests for the changes have been added.
Breaking change
Additional information
Please, on review make a sanity recheck that this is not a breaking change.