Merge pull request #1015 from 2xB/always_nparray

Always convert PlotDataItem data to NumPy array
This commit is contained in:
Ogi Moore 2019-08-16 20:29:06 -07:00 committed by GitHub
commit 9bb82a8af2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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