Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 166d776

Browse filesBrowse files
committed
Use integer bins for unisnged int data
1 parent 71f6716 commit 166d776
Copy full SHA for 166d776

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/napari_matplotlib/histogram.py

Copy file name to clipboardExpand all lines: src/napari_matplotlib/histogram.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def draw(self) -> None:
7070

7171
# Important to calculate bins after slicing 3D data, to avoid reading
7272
# whole cube into memory.
73-
if data.dtype.kind == "i":
73+
if data.dtype.kind in {"i", "u"}:
7474
# Make sure integer data types have integer sized bins
7575
step = 1 + (np.max(data) - np.min(data)) // 100
7676
bins = np.arange(np.min(data), np.max(data) + step, step)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.