Fix subArray when input data is discontiguous
This commit is contained in:
parent
9ef9f73be5
commit
0c28de5fd8
@ -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:]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user