fixed bug in graphicsItems/ImageItem.py: degenerate images (max==min) would raise exception in getHistogram()
This commit is contained in:
parent
574c5f3a47
commit
d261c2f0f2
|
@ -487,6 +487,9 @@ class ImageItem(GraphicsObject):
|
|||
if bins == 'auto':
|
||||
mn = np.nanmin(stepData)
|
||||
mx = np.nanmax(stepData)
|
||||
if mx == mn:
|
||||
# degenerate image, arange will fail
|
||||
mx += 1
|
||||
if np.isnan(mn) or np.isnan(mx):
|
||||
# the data are all-nan
|
||||
return None, None
|
||||
|
|
Loading…
Reference in New Issue
Block a user