From 993871b1ae2dfb23cc34145f1b1032a440b26763 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Mon, 13 Jul 2020 12:51:03 -0700 Subject: [PATCH] InfinifteLine.setPos add support for array arg --- pyqtgraph/graphicsItems/InfiniteLine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/graphicsItems/InfiniteLine.py b/pyqtgraph/graphicsItems/InfiniteLine.py index 37d84c7e..cec6b967 100644 --- a/pyqtgraph/graphicsItems/InfiniteLine.py +++ b/pyqtgraph/graphicsItems/InfiniteLine.py @@ -222,8 +222,8 @@ class InfiniteLine(GraphicsObject): def setPos(self, pos): - if type(pos) in [list, tuple]: - newPos = pos + if type(pos) in [list, tuple, np.ndarray]: + newPos = list(pos) elif isinstance(pos, QtCore.QPointF): newPos = [pos.x(), pos.y()] else: