Commit f1eeccb4 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

add fill() method

parent 352cd0f7
Pipeline #21111 passed with stage
in 4 minutes and 28 seconds
......@@ -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
......
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