Skip to content
Snippets Groups Projects
Unverified Commit 8cd76686 authored by Nick Draper's avatar Nick Draper Committed by GitHub
Browse files

Merge pull request #28107 from martyngigg/27994-sliceviewer-np112-indexerror

Also catch IndexError for numpy array access with bool
parents ae8cea12 1232d2fc
No related merge requests found
......@@ -195,7 +195,7 @@ class ColorbarWidget(QWidget):
try:
self.cmin_value = data[~data.mask].min()
self.cmax_value = data[~data.mask].max()
except AttributeError:
except (AttributeError, IndexError):
self.cmin_value = np.nanmin(data)
self.cmax_value = np.nanmax(data)
except (ValueError, RuntimeWarning):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment