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

Closes #3283: histogram2d between different dtypes #3763

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jaketrookman
Copy link
Contributor

This PR (Closes #3283) by adding mixed types to work with histogram2d and matches the result dtypes with Numpy.

@jaketrookman jaketrookman marked this pull request as ready for review September 11, 2024 18:46
Copy link
Contributor

@ajpotts ajpotts left a comment

Choose a reason for hiding this comment

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

Looks good!

Please remember to squash the commits when you get a chance.

src/Histogram.chpl Show resolved Hide resolved
Copy link
Member

@stress-tess stress-tess left a comment

Choose a reason for hiding this comment

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

question about the histogramGlobalAtomic histogram type. It's worth noting this never gets run by our tests bc the problem size has to be quite large to take this code path

@@ -61,7 +61,7 @@ module Histogram
return hist;
}

proc histogramGlobalAtomic(x: [?aD] ?etype, y: [aD] etype, xMin: etype, xMax: etype, yMin: etype, yMax: etype, numXBins: int, numYBins: int, xBinWidth: real, yBinWidth: real) throws {
proc histogramGlobalAtomic(x: [?aD] ?etype1, y: [aD] ?etype2, xMin: etype1, xMax: etype1, yMin: etype2, yMax: etype2, numXBins: int, numYBins: int, xBinWidth: real, yBinWidth: real) throws {
const totNumBins = numXBins * numYBins;
var hD = makeDistDom(totNumBins);
var atomicHist: [hD] atomic int;
Copy link
Member

Choose a reason for hiding this comment

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

all the other atomicHist were turned into real, should this one be too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

histogram2d between different dtypes
3 participants