diff --git a/nifty/field.py b/nifty/field.py index e1b739aa02194adcbb7fef553f72abbd5ae5acc4..03fe28e9e5e67d947b8204ab6e7028e63f9d466d 100644 --- a/nifty/field.py +++ b/nifty/field.py @@ -139,11 +139,6 @@ class Field(object): @staticmethod def _infer_dtype(dtype, val): - if val is None or dtype is not None: - return np.result_type(dtype, np.float64) - if isinstance(val, Field): - return val.dtype - return np.result_type(val, np.float64) if dtype is not None: return dtype if val is None: diff --git a/test/test_operators/test_fft_operator.py b/test/test_operators/test_fft_operator.py index 5aad325300e84b529e6fe4188d7371821f368ba1..53887300e419807f7102b6e83cc1670035ce246e 100644 --- a/test/test_operators/test_fft_operator.py +++ b/test/test_operators/test_fft_operator.py @@ -125,7 +125,7 @@ class FFTOperatorTests(unittest.TestCase): b = ift.HPSpace(nside=lm//2) fft = ift.FFTOperator(domain=a, target=b) inp = ift.Field.from_random(domain=a, random_type='normal', - std=1, mean=0, dtype=tp) + std=1, mean=0.1, dtype=tp) out = fft.times(inp) v1 = np.sqrt(out.vdot(out)) v2 = np.sqrt(inp.vdot(fft.adjoint_times(out)))