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
Reword BoundaryNorm docs. #20898
Reword BoundaryNorm docs. #20898
Conversation
lib/matplotlib/colors.py
Outdated
instead of to the interval 0-1. (Mapping to the 0-1 interval could have | ||
been done via piece-wise linear interpolation, but using integers seems | ||
simpler, and reduces the number of conversions back and forth between int | ||
and float.) |
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.
Is out of scope of the PR, I know, but does the parenthetical part need to be rendered in the docs? This seems like an implementation detail?
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.
sure, moved it to a comment.
lib/matplotlib/colors.py
Outdated
This method behaves similarly to `.Normalize.__call__`, but returns | ||
integers or arrays of int16, instead of floats in the ``[0, 1]`` |
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.
I don't think it needs the "instead of floats" parts. Folks can look up the other normalize methods if they need to know the difference, and that there is a difference has already been noted via the '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.
sure
In particular, move the `Returns` block from `__init__` to `__call__`, where it actually belongs. I believe that Norms are low-level enough constructs that it is sufficient to just refer to the base class docstring, without going through fancy docstring interpolation.
In particular, move the
Returns
block from__init__
to__call__
,where it actually belongs. I believe that Norms are low-level enough
constructs that it is sufficient to just refer to the base class
docstring, without going through fancy docstring interpolation.
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).