Skip to content

Commit

Permalink
Fix line break.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankong committed Jul 24, 2019
1 parent ca2c484 commit 840c0df
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sigpy/fourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"""FFT and non-uniform FFT (NUFFT) functions.
"""
import math
import numpy as np

from math import ceil
from sigpy import backend, interp, util


Expand Down Expand Up @@ -277,9 +277,9 @@ def _scale_coord(coord, shape, oversamp):
ndim = coord.shape[-1]
device = backend.get_device(coord)
scale = backend.to_device(
[math.ceil(oversamp * i) / i for i in shape[-ndim:]], device)
[ceil(oversamp * i) / i for i in shape[-ndim:]], device)
shift = backend.to_device(
[math.ceil(oversamp * i) // 2 for i in shape[-ndim:]], device)
[ceil(oversamp * i) // 2 for i in shape[-ndim:]], device)

with device:
coord = scale * coord + shift
Expand All @@ -288,7 +288,7 @@ def _scale_coord(coord, shape, oversamp):


def _get_oversamp_shape(shape, ndim, oversamp):
return list(shape)[:-ndim] + [math.ceil(oversamp * i) for i in shape[-ndim:]]
return list(shape)[:-ndim] + [ceil(oversamp * i) for i in shape[-ndim:]]


def _apodize(input, ndim, oversamp, width, beta):
Expand All @@ -299,7 +299,7 @@ def _apodize(input, ndim, oversamp, width, beta):
with device:
for a in range(-ndim, 0):
i = output.shape[a]
os_i = math.ceil(oversamp * i)
os_i = ceil(oversamp * i)
idx = xp.arange(i, dtype=output.dtype)

# Calculate apodization
Expand Down

0 comments on commit 840c0df

Please sign in to comment.