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.fillPath = None
|
||||||
self.invalidateBounds()
|
self.invalidateBounds()
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def setData(self, *args, **kargs):
|
def setData(self, *args, **kargs):
|
||||||
"""
|
"""
|
||||||
=============== ========================================================
|
=============== ========================================================
|
||||||
@ -358,7 +358,7 @@ class PlotCurveItem(GraphicsObject):
|
|||||||
kargs[k] = data
|
kargs[k] = data
|
||||||
if not isinstance(data, np.ndarray) or data.ndim > 1:
|
if not isinstance(data, np.ndarray) or data.ndim > 1:
|
||||||
raise Exception("Plot data must be 1D ndarray.")
|
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.")
|
raise Exception("Can not plot complex data types.")
|
||||||
|
|
||||||
profiler("data checks")
|
profiler("data checks")
|
||||||
|
Loading…
Reference in New Issue
Block a user