-
Notifications
You must be signed in to change notification settings - Fork 89
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
zip + combinations clobbers data on x86? #2695
Comments
@iasonkrom @NJManganelli |
Interestingly: import numpy as np
import awkward as ak
if __name__ == "__main__":
ar = ak.Array(200*np.random.random((100_000, 3)).astype(np.float32) + 32)
electrons = ak.zip({"pt": ar})
combos = ak.combinations(electrons, 2, fields=["first", "second"])
for _ in range(10):
print(np.histogram(ak.flatten(combos.second.pt), bins=[0, 10, 20, 30, 40, 80, 120, 200])) Functions correctly and produces the correct output. |
If I go to just using the boost_histogram python bindings, rather than hist, the problem is still there. @henryiii @HDembinski FYI this appears to be some deeply odd interaction between awkward array and boost histogram. We may want to move the issue there? |
Interestingly - if I switch dtype from |
casting to |
At a request from @agoose77 the following functions correctly: import boost_histogram as bh
import numpy as np
import awkward as ak
if __name__ == "__main__":
ar = ak.Array(200*np.random.random((100_000, 3)).astype(np.float32) + 32)
electrons = ak.zip({"pt": ar})
combos = ak.combinations(electrons, 2, fields=["first", "second"])
for _ in range(10):
x = bh.Histogram(bh.axis.Variable([0, 10, 20, 30, 40, 80, 120, 200]))
print(x.fill(ak.flatten(combos.second.pt).to_numpy()).values(flow=True)) with either |
filling with |
Version of Awkward Array
2.4.1
Description and code to reproduce
Starting from investigation in: dask-contrib/dask-histogram#100
results in:
Note there are no underflows or values less than 32 in the dataset.
If I print out
ak.flatten(combos.second.pt)
before the histogram filling step the error magically goes away.Still might be a histogramming issue.
The text was updated successfully, but these errors were encountered: