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

slice not working for numpy==1.25.1 #70

Closed
dachengx opened this issue Jul 31, 2023 · 1 comment
Closed

slice not working for numpy==1.25.1 #70

dachengx opened this issue Jul 31, 2023 · 1 comment
Assignees

Comments

@dachengx
Copy link
Collaborator

for j, bincs in enumerate(h.bin_centers()):
hsliced = h_comp.get_axis_bin_index(bincs[0], j)
hsliceu = h_comp.get_axis_bin_index(bincs[-1], j) + 1
hslices.append(slice(hsliced, hsliceu))
base_part_norm = histograms[0][hslices].sum()
h_comp[hslices] += h.histogram # TODO check here what norm I want.

This is causing errors at https://github.com/XENONnT/alea/actions/runs/5710944865/job/15471836050?pr=69

@dachengx dachengx self-assigned this Jul 31, 2023
dachengx added a commit that referenced this issue Jul 31, 2023
@dachengx
Copy link
Collaborator Author

dachengx commented Aug 8, 2023

The solution is to change h_comp[hslices] to h_comp[tuple(hslices)], which is already implemented at #69.

@dachengx dachengx closed this as completed Aug 8, 2023
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

No branches or pull requests

1 participant