From 0c28de5fd80f73394664e0eba888825c6714ad25 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Wed, 4 Oct 2017 10:24:34 -0700 Subject: [PATCH] Fix subArray when input data is discontiguous --- pyqtgraph/functions.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyqtgraph/functions.py b/pyqtgraph/functions.py index 8ef57742..7ad603f7 100644 --- a/pyqtgraph/functions.py +++ b/pyqtgraph/functions.py @@ -747,8 +747,7 @@ def subArray(data, offset, shape, stride): the input in the example above to have shape (10, 7) would cause the output to have shape (2, 3, 7). """ - #data = data.flatten() - data = data[offset:] + data = np.ascontiguousarray(data)[offset:] shape = tuple(shape) extraShape = data.shape[1:]