diff --git a/nifty/field.py b/nifty/field.py index cce6f640b63dea90561365e54e6651e2d480a53b..856dfd5a660c4ba1bbff70869627b70093cf5b67 100644 --- a/nifty/field.py +++ b/nifty/field.py @@ -245,8 +245,14 @@ class Field(Loggable, Versionable, object): result_domain = list(self.domain) result_domain[space_index] = power_domain + if real_signal: + result_dtype = np.complex + else: + result_dtype = np.float + result_field = self.copy_empty( domain=result_domain, + dtype=result_dtype, distribution_strategy=power_spectrum.distribution_strategy) result_field.set_val(new_val=power_spectrum, copy=False)