improve performance of updateData PlotCurveItem (saves about 2us per call) (#1079)
* improve performance of updateData PlotCurveItem (saves about 2us per call)
This commit is contained in:
parent
2203933393
commit
15a1f5af94
@ -293,7 +293,7 @@ class PlotCurveItem(GraphicsObject):
|
||||
self.fillPath = None
|
||||
self.invalidateBounds()
|
||||
self.update()
|
||||
|
||||
|
||||
def setData(self, *args, **kargs):
|
||||
"""
|
||||
=============== ========================================================
|
||||
@ -358,7 +358,7 @@ class PlotCurveItem(GraphicsObject):
|
||||
kargs[k] = data
|
||||
if not isinstance(data, np.ndarray) or data.ndim > 1:
|
||||
raise Exception("Plot data must be 1D ndarray.")
|
||||
if 'complex' in str(data.dtype):
|
||||
if data.dtype.kind == 'c':
|
||||
raise Exception("Can not plot complex data types.")
|
||||
|
||||
profiler("data checks")
|
||||
|
Loading…
Reference in New Issue
Block a user