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 9217d10 commit f0bdb02Copy full SHA for f0bdb02
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
@@ -48,7 +53,7 @@ def draw(self) -> None:
48
53
49
54
# Important to calculate bins after slicing 3D data, to avoid reading
50
55
# whole cube into memory.
51
- bins = np.linspace(np.min(data), np.max(data), 100)
56
+ bins = np.linspace(np.min(data), np.max(data), 100, dtype=data.dtype)
52
57
58
if layer.rgb:
59
# Histogram RGB channels independently
0 commit comments