8000 DOC: unambiguous np.histogram dtype description by hmeine · Pull Request #25520 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DOC: unambiguous np.histogram dtype description #25520

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

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

hmeine
Copy link
Contributor
@hmeine hmeine commented Jan 2, 2024

As a follow-up of #25403, let's be more specific than "dictates the
dtype" because that could still mean that there is a mapping applied
such as weights uint8 -> acc uint64, weights float -> acc double, ...

That would make so much sense that people could expect that and thus
read it into the documentation, I am afraid.

Skipping all CI because this is a documentation correction:
[skip ci]

As a follow-up of numpy#25403, let's be more specific than "dictates the
dtype" because that could still mean that there is a mapping applied
such as weights uint8 -> acc uint64, weights float -> acc double, ...

That would make so much sense that people could expect that and thus
read it into the documentation, I am afraid.
Comment on lines 730 to 731
``hist.dtype`` will be taken from `weights`, otherwise it will
hold large integers.
Copy link
Member
@ngoldbaum ngoldbaum Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
``hist.dtype`` will be taken from `weights`, otherwise it will
hold large integers.
``hist.dtype`` will be taken from `weights`.

Either delete this or rephrase a bit, "hold large integers" is ambiguous. I also think the explanation you've added in the weights description is sufficient, no need to repeat with different wording here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at it again and just followed your suggestion / pushed an updated branch. (For a clean history, that second commit could be a "fixup" commit squashed into the first, but I don't know how the numpy merge process looks like.)

following ngoldbaum's suggestion, "large integers" was not a good description
and not necessary here.
Copy link
Contributor
@rossbar rossbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hmeine for the updates!

@rossbar rossbar merged commit 448e4da into numpy:main Jan 17, 2024
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.

4 participants
0