We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c481207 commit 99a3fc0Copy full SHA for 99a3fc0
src/napari_matplotlib/histogram.py
@@ -4,7 +4,12 @@
4
import numpy as np
5
import numpy.typing as npt
6
from matplotlib.container import BarContainer
7
-from qtpy.QtWidgets import QComboBox, QLabel, QVBoxLayout, QWidget
+from qtpy.QtWidgets import (
8
+ QComboBox,
9
+ QLabel,
10
+ QVBoxLayout,
11
+ QWidget,
12
+)
13
14
from .base import SingleAxesWidget
15
from .features import FEATURES_LAYER_TYPES
@@ -65,7 +70,7 @@ def draw(self) -> None:
65
70
66
71
# Important to calculate bins after slicing 3D data, to avoid reading
67
72
# whole cube into memory.
68
- bins = np.linspace(np.min(data), np.max(data), 100)
73
+ bins = np.linspace(np.min(data), np.max(data), 100, dtype=data.dtype)
69
74
75
if layer.rgb:
76
# Histogram RGB channels independently
0 commit comments