Prevent element-wise string comparison (code by @flutefreak7) (#1024)

This commit is contained in:
2xB 2019-09-13 06:30:39 +02:00 committed by Ogi Moore
parent 8309b53014
commit bfd36dc203

View File

@ -488,7 +488,7 @@ class ImageItem(GraphicsObject):
step = (step, step)
stepData = self.image[::step[0], ::step[1]]
if 'auto' == bins:
if isinstance(bins, str) and bins == 'auto':
mn = np.nanmin(stepData)
mx = np.nanmax(stepData)
if mx == mn: