Fixed dataBounds error when all values were inf.
If all values are inf. d = d[mask] will create an empty array. You cannot call min or max on an empty array.
This commit is contained in:
parent
c247aa3989
commit
2dc31b53da
@ -132,7 +132,11 @@ class PlotCurveItem(GraphicsObject):
|
||||
if any(np.isinf(b)):
|
||||
mask = np.isfinite(d)
|
||||
d = d[mask]
|
||||
b = (d.min(), d.max())
|
||||
try:
|
||||
b = (d.min(), d.max())
|
||||
except ValueError:
|
||||
# d has no size, because all of d is inf.
|
||||
b = (-1, 1) # Some default bounds
|
||||
|
||||
elif frac <= 0.0:
|
||||
raise Exception("Value for parameter 'frac' must be > 0. (got %s)" % str(frac))
|
||||
|
Loading…
Reference in New Issue
Block a user