Commit 2396e6c9 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

fix operator overloading

parent 5f6a0612
Pipeline #23343 passed with stage
in 4 minutes and 33 seconds
......@@ -451,7 +451,7 @@ class Field(object):
tval = getattr(self.val, op)(other)
return self if tval is self.val else Field(self.domain, tval)
raise TypeError
return NotImplemented
def __add__(self, other):
return self._binary_helper(other, op='__add__')
......
......@@ -102,7 +102,7 @@ class LinearOperator(with_metaclass(
return DiagonalOperator(thing)
if np.isscalar(thing):
return ScalingOperator(thing, dom)
raise TypeError
return NotImplemented
def __mul__(self, other):
from .chain_operator import ChainOperator
......
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