Skip to content

Commit

Permalink
Merge pull request #9 from Clonkk/hotfix
Browse files Browse the repository at this point in the history
Hotfix
  • Loading branch information
Clonkk authored Feb 3, 2021
2 parents 98d4510 + f8bc7b9 commit 70a43c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fftw3/fftshift.nim
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ proc circshift_impl[T](t: Tensor[T], xshift: int, yshift: int, zshift: int): Ten
let
coord = idx.get3DCoord(result)
ii = (coord.I + xshift) mod X
jj = (coord.J + xshift) mod X
kk = (coord.K + xshift) mod X
jj = (coord.J + yshift) mod Y
kk = (coord.K + zshift) mod Z
result[ii, jj, kk] = t[coord.I, coord.J, coord.K]

proc circshift_impl[T](t: Tensor[T], xshift: int, yshift: int): Tensor[T] =
Expand All @@ -64,7 +64,7 @@ proc circshift_impl[T](t: Tensor[T], xshift: int, yshift: int): Tensor[T] =
let
coord = idx.get2DCoord(result)
ii = (coord.I + xshift) mod X
jj = (coord.J + xshift) mod X
jj = (coord.J + yshift) mod Y
result[ii, jj] = t[coord.I, coord.J]

proc circshift_impl[T](t: Tensor[T], xshift: int): Tensor[T] =
Expand Down

0 comments on commit 70a43c7

Please sign in to comment.