Fix subArray when input data is discontiguous

This commit is contained in:
Luke Campagnola 2017-10-04 10:24:34 -07:00
parent 9ef9f73be5
commit 0c28de5fd8

View File

@ -747,8 +747,7 @@ def subArray(data, offset, shape, stride):
the input in the example above to have shape (10, 7) would cause the the input in the example above to have shape (10, 7) would cause the
output to have shape (2, 3, 7). output to have shape (2, 3, 7).
""" """
#data = data.flatten() data = np.ascontiguousarray(data)[offset:]
data = data[offset:]
shape = tuple(shape) shape = tuple(shape)
extraShape = data.shape[1:] extraShape = data.shape[1:]