Commit 9ddc2cd9 authored by Philipp Arras's avatar Philipp Arras
Browse files

Add .scale() to Field

parent b4b25dc3
......@@ -405,6 +405,11 @@ class Field(Operator):
return Field(DomainTuple.make(return_domain), data)
def scale(self, factor):
if factor == 1:
return self
return factor*self
def sum(self, spaces=None):
"""Sums up over the sub-domains given by `spaces`.
......
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