Commit 8f98a8f3 authored by Martin Reinecke's avatar Martin Reinecke

Issue #207: raise an exception for currently unsupported cases

parent e51e8754
Pipeline #23392 passed with stage
in 4 minutes and 44 seconds
......@@ -423,13 +423,19 @@ class Field(object):
return self._contraction_helper('max', spaces)
def mean(self, spaces=None):
return self._contraction_helper('mean', spaces)
if self.scalar_weight(spaces) is not None:
return self._contraction_helper('mean', spaces)
raise NotImplementedError
def var(self, spaces=None):
return self._contraction_helper('var', spaces)
if self.scalar_weight(spaces) is not None:
return self._contraction_helper('var', spaces)
raise NotImplementedError
def std(self, spaces=None):
return self._contraction_helper('std', spaces)
if self.scalar_weight(spaces) is not None:
return self._contraction_helper('std', spaces)
return sqrt(self.var(spaces))
def copy_content_from(self, other):
if not isinstance(other, Field):
......
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