From 7039bc1c2d32cf86c8f25d39bcf1bf394368bdd4 Mon Sep 17 00:00:00 2001 From: Andrew Dupuis Date: Mon, 26 Feb 2024 15:48:58 -0500 Subject: [PATCH] Fix Numpy complex type (#94) * Fix Numpy complex type * Restore complex128 in interpolation coeffs --- README.md | 2 +- docs/source/basic.rst | 2 +- profile_torchkbnufft.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 18786c0..75187dd 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/docs/source/basic.rst b/docs/source/basic.rst index 5d29aa4..2ab8255 100644 --- a/docs/source/basic.rst +++ b/docs/source/basic.rst @@ -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) diff --git a/profile_torchkbnufft.py b/profile_torchkbnufft.py index e177d9e..03749dc 100644 --- a/profile_torchkbnufft.py +++ b/profile_torchkbnufft.py @@ -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 = (