File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,14 @@ def _update_contrast_lims(self) -> None:
125125
126126 def autoset_widget_bins (self , data : npt .NDArray [Any ]) -> None :
127127 """Update widgets with bins determined from the image data"""
128-
129128 if data .dtype .kind in {"i" , "u" }:
130129 # Make sure integer data types have integer sized bins
131130 # We can't use unsigned ints when calculating the step, otherwise
132131 # the following warning is raised:
133132 # 'RuntimeWarning: overflow encountered in scalar subtract'
134- step = abs (np .min (data ).astype (int ) - np .max (data ).astype (int ) // 100 )
133+ step = abs (
134+ np .min (data ).astype (int ) - np .max (data ).astype (int ) // 100
135+ )
135136 step = max (1 , step )
136137 bins = np .arange (np .min (data ), np .max (data ) + step , step )
137138 else :
@@ -141,7 +142,6 @@ def autoset_widget_bins(self, data: npt.NDArray[Any]) -> None:
141142 self .bins_stop = bins [- 1 ]
142143 self .bins_num = bins .size
143144
144-
145145 @property
146146 def bins_start (self ) -> float :
147147 """Minimum bin edge"""
You can’t perform that action at this time.
0 commit comments