Merge pull request #767 from jimofthecorn/develop
fixed bug in graphicsItems/ImageItem.py: degenerate images (max==min)
This commit is contained in:
commit
c71083fff8
@ -487,6 +487,9 @@ class ImageItem(GraphicsObject):
|
|||||||
if bins == 'auto':
|
if bins == 'auto':
|
||||||
mn = np.nanmin(stepData)
|
mn = np.nanmin(stepData)
|
||||||
mx = np.nanmax(stepData)
|
mx = np.nanmax(stepData)
|
||||||
|
if mx == mn:
|
||||||
|
# degenerate image, arange will fail
|
||||||
|
mx += 1
|
||||||
if np.isnan(mn) or np.isnan(mx):
|
if np.isnan(mn) or np.isnan(mx):
|
||||||
# the data are all-nan
|
# the data are all-nan
|
||||||
return None, None
|
return None, None
|
||||||
|
Loading…
Reference in New Issue
Block a user