Skip to content

Commit

Permalink
Merge pull request #1762 from girder/histogram-range-float
Browse files Browse the repository at this point in the history
Cast histogram ranges to floats
  • Loading branch information
manthey authored Jan 8, 2025
2 parents 9f598c9 + e809fc4 commit 5344175
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
### Bug Fixes

- Harden the tile cache between python versions and numpy versions ([#1751](../../pull/1751))
- Cast histogram ranges to floats ([#1762](../../pull/1762))

## 1.30.5

Expand Down
3 changes: 2 additions & 1 deletion large_image/tilesource/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ def histogram( # noqa
for idx in range(min(len(results['min']), tile.shape[-1])):
entry = results['histogram'][idx]
hist, bin_edges = np.histogram(
tile[:, :, idx], entry['bins'], entry['range'], density=False)
tile[:, :, idx], entry['bins'],
(float(entry['range'][0]), float(entry['range'][1])), density=False)
if entry['hist'] is None:
entry['hist'] = hist
entry['bin_edges'] = bin_edges
Expand Down

0 comments on commit 5344175

Please sign in to comment.