Commit 6741a646 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

cosmetics

parent 2f5dab3d
......@@ -31,16 +31,15 @@ from ..utilities import iscomplextype
def _multiToArray(fld):
szall = 0
for val in fld.values():
szall += 2*val.size if iscomplextype(val.dtype) else val.size
szall = sum(2*v.size if iscomplextype(v.dtype) else v.size
for v in fld.values())
res = np.empty(szall, dtype=np.float64)
ofs = 0
for val in fld.values():
sz2 = 2*val.size if iscomplextype(val.dtype) else val.size
locdat = val.local_data.reshape(-1)
if iscomplextype(val.dtype):
locdat = locdat.astype(np.complex128).view(np.float64)
locdat = locdat.view(locdat.real.dtype)
res[ofs:ofs+sz2] = locdat
ofs += sz2
return res
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment