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

Don't cast histogram to int64 when density=True #1042

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

manopapad
Copy link
Contributor

In that case the histogram is expected to have floating-point values, and casting those to ints drops information. E.g. this example:

import cunumeric as cn
data = cn.arange(20)
hist, _ = cn.histogram(data, density=True)
print(hist)

would print out

[0 0 0 0 0 0 0 0 0 0]

rather than

[0.05263158 0.05263158 0.05263158 0.05263158 0.05263158 0.05263158 0.05263158 0.05263158 0.05263158 0.05263158]

@manopapad manopapad added the category:bug-fix PR is a bug fix and will be classified as such in release notes label Sep 6, 2023
@manopapad manopapad merged commit f014105 into nv-legate:branch-23.09 Sep 6, 2023
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bug-fix PR is a bug fix and will be classified as such in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants