_CopyExtrapolation.__neg__ now returns self
This is typically only called when values also get negated, e.g. in Field._op1().
@@ -365,6 +365,9 @@ class _CopyExtrapolation(Extrapolation):
def __gt__(self, other):
return self._op(other, ConstantExtrapolation.__lt__)
+ def __neg__(self):
+ return self # assume the values are also negated
+
class _BoundaryExtrapolation(_CopyExtrapolation):
"""Uses the closest defined value for points lying outside the defined region."""
