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:
Daniel Hrisca 2019-11-19 18:14:53 +02:00 committed by Ogi Moore
parent 2203933393
commit 15a1f5af94

View File

@ -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")