File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 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
23
34import napari
45import numpy as np
@@ -60,6 +61,9 @@ def draw(self) -> None:
6061
6162
6263class FeaturesHistogramWidget (SingleAxesWidget ):
64+ """
65+ Display a histogram of selected feature attached to selected layer.
66+ """
6367 n_layers_input = Interval (1 , 1 )
6468 # All layers that have a .features attributes
6569 input_layer_types = FEATURES_LAYER_TYPES
@@ -109,7 +113,7 @@ def _get_valid_axis_keys(self) -> List[str]:
109113 else :
110114 return self .layers [0 ].features .keys ()
111115
112- def _get_data (self ) -> Tuple [np . ndarray , str ]:
116+ def _get_data (self ) -> Tuple [npt . NDArray [ Any ] , str ]:
113117 """Get the plot data.
114118
115119 Returns
@@ -163,4 +167,4 @@ def draw(self) -> None:
163167
164168 # set ax labels
165169 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