Skip to content

Commit

Permalink
Fix Numpy complex type (#94)
Browse files Browse the repository at this point in the history
* Fix Numpy complex type

* Restore complex128 in interpolation coeffs
  • Loading branch information
Andrew-Dupuis authored Feb 26, 2024
1 parent 20c45a2 commit 7039bc1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import torchkbnufft as tkbn
import numpy as np
from skimage.data import shepp_logan_phantom

x = shepp_logan_phantom().astype(np.complex)
x = shepp_logan_phantom().astype(complex)
im_size = x.shape
# convert to tensor, unsqueeze batch and coil dimension
# output size: (1, 1, ny, nx)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ radial spoke of k-space data:
import numpy as np
from skimage.data import shepp_logan_phantom
x = shepp_logan_phantom().astype(np.complex)
x = shepp_logan_phantom().astype(complex)
im_size = x.shape
# convert to tensor, unsqueeze batch and coil dimension
# output size: (1, 1, ny, nx)
Expand Down
2 changes: 1 addition & 1 deletion profile_torchkbnufft.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def run_all_profiles():

# create an example to run on
image = np.array(Image.fromarray(camera()).resize((256, 256)))
image = image.astype(np.complex)
image = image.astype(complex)
im_size = image.shape

image = (
Expand Down

0 comments on commit 7039bc1

Please sign in to comment.