The Wayback Machine - https://web.archive.org/web/20230308114910/https://github.com/matplotlib/matplotlib/pull/20898
Skip to content
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

Merged
merged 1 commit into from Aug 25, 2021
Merged

Reword BoundaryNorm docs. #20898

merged 1 commit into from Aug 25, 2021

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 25, 2021

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

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

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.)
Copy link
Member

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?

Copy link
Contributor Author

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.

This method behaves similarly to `.Normalize.__call__`, but returns
integers or arrays of int16, instead of floats in the ``[0, 1]``
Copy link
Member

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'

Copy link
Contributor Author

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.
@story645 story645 merged commit 298e92f into matplotlib:master Aug 25, 2021
28 checks passed
@anntzer anntzer deleted the bn branch August 25, 2021 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants