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
added feature drop negative weights #534
added feature drop negative weights #534
Conversation
Codecov Report
@@ Coverage Diff @@
## main #534 +/- ##
=====================================
Coverage 93.5% 93.6%
=====================================
Files 48 48
Lines 5267 5285 +18
=====================================
+ Hits 4929 4947 +18
Misses 338 338
Continue to review full report at Codecov.
|
8073359
to
cf7d1a4
Compare
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.
Thank you @LauWien, really nice draft! A few comments inline on more efficient code and better documentation, and a suggestion for a more elaborate test.
FYI, I also added the statement "closes #446" to the PR description - so when this PR is merged, the issue will be closed automatically |
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.
Thank you @LauWien!
I think that there is a flaw in your implementation, see the inline comment.
Also, the docstrings of pyam are not consistent, sometimes it's
arg : type, default <some value>
bla ba
sometimes the (correct numpy-docs) style
arg : type, optional
Bla ba
The idea is to pragmatically harmonize whenever a function is changed or updated - could you please do this for the docstring of the aggregate_region()
function?
Thank you Laura - can you please rebase and implement the other to-dos from the description (and then mark them as closed): adding yourself to the list of authors of the package and adding one line to the release notes? |
3a05148
to
8073359
Compare
This reverts commit c3bd282.
76b3d19
to
14e5b38
Compare
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.
Thanks you, @LauWien, for your first contribution to the IAM community! Congrats!
Please confirm that this PR has done the following:
Description of PR
This PR implements the proposed 8th solution of the issue #446
By default any values with negative weights are getting now dropped. Additionally a warning's is beeing printed:
With the implemented boolean keyword argument
drop_negative
(default is True) this dropping can be overwritten by setting this keyword to False.closes #446