zero-step in np.arange (#1468)
This commit is contained in:
parent
3af23725ca
commit
c5c41b9090
|
@ -491,7 +491,9 @@ class ImageItem(GraphicsObject):
|
||||||
if stepData.dtype.kind in "ui":
|
if stepData.dtype.kind in "ui":
|
||||||
# For integer data, we select the bins carefully to avoid aliasing
|
# For integer data, we select the bins carefully to avoid aliasing
|
||||||
step = np.ceil((mx-mn) / 500.)
|
step = np.ceil((mx-mn) / 500.)
|
||||||
bins = np.arange(mn, mx+1.01*step, step, dtype=np.int)
|
bins = []
|
||||||
|
if step > 0.0:
|
||||||
|
bins = np.arange(mn, mx+1.01*step, step, dtype=np.int)
|
||||||
else:
|
else:
|
||||||
# for float data, let numpy select the bins.
|
# for float data, let numpy select the bins.
|
||||||
bins = np.linspace(mn, mx, 500)
|
bins = np.linspace(mn, mx, 500)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user