Skip to content

Commit

Permalink
avoid exceptions to print np.int64() in the shape with numpy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
t20100 committed Mar 20, 2024
1 parent 7032522 commit cca8be6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/silx/math/chistogramnd.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def chistogramnd(sample,
if np.any(np.equal(n_bins, None)) or np.any(n_bins <= 0):
raise ValueError('<n_bins> : only positive values allowed.')

output_shape = tuple(n_bins)
output_shape = tuple(int(bin) for bin in n_bins)

# checking the histo array, if provided
if histo is None:
Expand Down

0 comments on commit cca8be6

Please sign in to comment.