Fix shift_with_mirror() for C-ordered arrays

This commit is contained in:
Jan Petykiewicz 2019-08-26 00:16:45 -07:00
parent b466ed02ea
commit 0503e9d6ef

View File

@ -341,9 +341,7 @@ def shift_with_mirror(axis: int, shape: List[int], shift_distance: int=1) -> spa
n = numpy.prod(shape)
i_ind = numpy.arange(n)
j_ind = ijk[0] + ijk[1] * shape[0]
if len(shape) == 3:
j_ind += ijk[2] * shape[0] * shape[1]
j_ind = numpy.ravel_multi_index(ijk, shape, order='C')
vij = (numpy.ones(n), (i_ind, j_ind.ravel(order='C')))