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:
125
125
126
126
def autoset_widget_bins (self , data : npt .NDArray [Any ]) -> None :
127
127
"""Update widgets with bins determined from the image data"""
128
-
129
128
if data .dtype .kind in {"i" , "u" }:
130
129
# Make sure integer data types have integer sized bins
131
130
# We can't use unsigned ints when calculating the step, otherwise
132
131
# the following warning is raised:
133
132
# '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
+ )
135
136
step = max (1 , step )
136
137
bins = np .arange (np .min (data ), np .max (data ) + step , step )
137
138
else :
@@ -141,7 +142,6 @@ def autoset_widget_bins(self, data: npt.NDArray[Any]) -> None:
141
142
self .bins_stop = bins [- 1 ]
142
143
self .bins_num = bins .size
143
144
144
-
145
145
@property
146
146
def bins_start (self ) -> float :
147
147
"""Minimum bin edge"""
You can’t perform that action at this time.
0 commit comments