-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Make the filternorm prop of Images a boolean rather than a {0,1} scalar. #10442
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
Conversation
A little bit of this is part of #10383. |
seems easy to rebase in either direction |
This seems a bit more pythonic and the C-API handles bools just as well. Also filternorm and filterrad are always defined (as bool and float, respectively, so no need to add `... or 0.0` when passing them to the C-API.
filternorm : scalar, optional, default: 1 | ||
A parameter for the antigrain image resize filter. From the | ||
antigrain documentation, if `filternorm` = 1, the filter | ||
filternorm : bool, optional, default: True |
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.
OK, so filternorm
was either 1 or zero?
The rest of this docstring doesn't make a lick of sense to me. I think they are trying to say the sum of the filter should be one, but???
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.
Feel free to propose a better wording :-) (it doesn't make sense to me either)
At least since #10383 matplotlib._image.resample
also documents norm
as a bool.
Concerning removal of What if users have used |
so the proposed case cannot occur. |
This seems a bit more pythonic and the C-API handles bools just as well.
Also filternorm and filterrad are always defined (as bool and float,
respectively, so no need to add
... or 0.0
when passing them to theC-API.
PR Summary
PR Checklist