MCPcopy
hub / github.com/tum-pbs/PhiFlow / to_complex

Function to_complex

tests/commit/test_poisson_solver.py:29–36  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

27
28
29def to_complex(x):
30 x = np.array(x)
31 if x.dtype in (np.complex64, np.complex128):
32 return x
33 elif x.dtype == np.float64:
34 return x.astype(np.complex128)
35 else:
36 return x.astype(np.complex64)
37
38
39def fftfreq(resolution, mode="vector", dtype=None):

Callers 1

FFT_solve_numpyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected