mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-11-15 10:33:57 +01:00
remove all reference to cmath, get code and tests to the point where they run at least.
This commit is contained in:
1 parent
188a685503
commit
a3765e9097
34 files changed
+911
-743
No files matched your search
@@ -8,7 +8,6 @@ images exist, as well as plotting scan patterns and nanomaps
|
||||
|
||||
from __future__ import division, print_function, absolute_import
|
||||
|
||||
from CDTools.tools import cmath
|
||||
import torch as t
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
@@ -129,7 +128,7 @@ def plot_image(im, plot_func=lambda x: x, fig=None, basis=None, units='$\\mu$m',
|
||||
# If final dimension is 2, assume it is a complex array. If not,
|
||||
# assume it represents a real array
|
||||
if im.shape[-1] == 2:
|
||||
im = cmath.torch_to_complex(im.detach().cpu())
|
||||
im = im.detach().cpu().numpy()
|
||||
else:
|
||||
im = im.detach().cpu().numpy()
|
||||
|
||||
|
||||
Reference in new issue
Block a user