Commit 3858e173 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

shortcut

parent 2ac52b09
......@@ -134,10 +134,7 @@ class Linearization(object):
OuterProduct(other._val, self._jac.domain)(self._jac)._myadd(
OuterProduct(self._val, other._jac.domain)(other._jac), False))
if np.isscalar(other):
if other == 1:
return self
met = None if self._metric is None else self._metric.scale(other)
return self.new(self._val*other, self._jac.scale(other), met)
return self.__mul__(other)
if isinstance(other, (Field, MultiField)):
return self.new(OuterProduct(self._val, other._val.domain)(other._val),
OuterProduct(other._val, self._jac.domain)(self._jac))
......
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