From abd028436ae7b1c9d63f2c23366b26cb6bd0a55d Mon Sep 17 00:00:00 2001 From: 2xB <2xB@users.noreply.github.com> Date: Thu, 8 Aug 2019 16:50:29 +0200 Subject: [PATCH] Always convert PlotDataItem data to NumPy array --- pyqtgraph/graphicsItems/PlotDataItem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py index 4bc9540f..bf119879 100644 --- a/pyqtgraph/graphicsItems/PlotDataItem.py +++ b/pyqtgraph/graphicsItems/PlotDataItem.py @@ -448,9 +448,9 @@ class PlotDataItem(GraphicsObject): if y is not None and x is None: x = np.arange(len(y)) - if isinstance(x, list): + if not isinstance(x, np.ndarray): x = np.array(x) - if isinstance(y, list): + if not isinstance(y, np.ndarray): y = np.array(y) self.xData = x.view(np.ndarray) ## one last check to make sure there are no MetaArrays getting by