Skip to content

Commit

Permalink
Merge pull request #14 from gschramm/main
Browse files Browse the repository at this point in the history
Bugfix: convert Arrays to numpy before passing them to matplitlib
  • Loading branch information
gschramm authored Nov 17, 2023
2 parents dca594d + a6d75f3 commit e9a1cd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/00_simulate_lm_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@
)
for i in range(img_shape[2]):
ax[0, i].imshow(
xp.asarray(to_device(img_f1[:, :, i], "cpu")), vmin=0, vmax=vmax, cmap="Greys"
np.asarray(to_device(img_f1[:, :, i], "cpu")), vmin=0, vmax=vmax, cmap="Greys"
)
ax[0, i].set_title(f"sl {i+1}", fontsize="small")

ax[1, i].imshow(
xp.asarray(to_device(img_f2[:, :, i], "cpu")), vmin=0, vmax=vmax, cmap="Greys"
np.asarray(to_device(img_f2[:, :, i], "cpu")), vmin=0, vmax=vmax, cmap="Greys"
)

ax[0, 0].set_ylabel("ground truth frame 1", fontsize="small")
Expand Down
2 changes: 1 addition & 1 deletion python/01_reconstruct_lm_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
fig, ax = plt.subplots(1, recon.shape[2], figsize=(recon.shape[2] * 2, 2))
for i in range(recon.shape[2]):
ax[i].imshow(
xp.asarray(to_device(recon[:, :, i], "cpu")), vmin=0, vmax=vmax, cmap="Greys"
np.asarray(to_device(recon[:, :, i], "cpu")), vmin=0, vmax=vmax, cmap="Greys"
)
ax[i].set_title(f"LM recon sl {i+1}", fontsize="small")

Expand Down

0 comments on commit e9a1cd6

Please sign in to comment.