diff --git a/nifty/field.py b/nifty/field.py index 87a2e5b9b10c3a0045638b825cdcdc5bba7a17b5..0edb52d07ec469b20b44b25894ba9087024db694 100644 --- a/nifty/field.py +++ b/nifty/field.py @@ -158,8 +158,6 @@ class Field(object): return val.dtype return np.result_type(val, np.float64) - # ---Factory methods--- - @staticmethod def from_random(random_type, domain, dtype=np.float64, **kwargs): """ Draws a random field with the given parameters. @@ -187,6 +185,9 @@ class Field(object): val=dobj.from_random(random_type, dtype=dtype, shape=domain.shape, **kwargs)) + def fill(self, fill_value): + self._val.fill(fill_value) + # ---Properties--- @property