File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
- from typing import Optional , List , Tuple
1
+ from typing import Optional , List , Tuple , Any
2
+ import numpy .typing as npt
2
3
3
4
import napari
4
5
import numpy as np
@@ -60,6 +61,9 @@ def draw(self) -> None:
60
61
61
62
62
63
class FeaturesHistogramWidget (SingleAxesWidget ):
64
+ """
65
+ Display a histogram of selected feature attached to selected layer.
66
+ """
63
67
n_layers_input = Interval (1 , 1 )
64
68
# All layers that have a .features attributes
65
69
input_layer_types = FEATURES_LAYER_TYPES
@@ -109,7 +113,7 @@ def _get_valid_axis_keys(self) -> List[str]:
109
113
else :
110
114
return self .layers [0 ].features .keys ()
111
115
112
- def _get_data (self ) -> Tuple [np . ndarray , str ]:
116
+ def _get_data (self ) -> Tuple [npt . NDArray [ Any ] , str ]:
113
117
"""Get the plot data.
114
118
115
119
Returns
@@ -163,4 +167,4 @@ def draw(self) -> None:
163
167
164
168
# set ax labels
165
169
self .axes .set_xlabel (x_axis_name )
166
- self .axes .set_ylabel ('Counts [#]' )
170
+ self .axes .set_ylabel ('Counts [#]' )
You can’t perform that action at this time.
0 commit comments