Handle case of 0-d array in infinite line setPos
This commit is contained in:
parent
389dff4250
commit
17b1b82ae9
@ -225,7 +225,7 @@ class InfiniteLine(GraphicsObject):
|
||||
|
||||
def setPos(self, pos):
|
||||
|
||||
if type(pos) in [list, tuple, np.ndarray]:
|
||||
if isinstance(pos, (list, tuple, np.ndarray)) and not np.ndim(pos) == 0:
|
||||
newPos = list(pos)
|
||||
elif isinstance(pos, QtCore.QPointF):
|
||||
newPos = [pos.x(), pos.y()]
|
||||
|
Loading…
Reference in New Issue
Block a user