Commit e6c68918 authored by Martin Reinecke's avatar Martin Reinecke


parent 67660e26
Pipeline #29564 passed with stages
in 4 minutes and 47 seconds
...@@ -20,7 +20,6 @@ from __future__ import division ...@@ -20,7 +20,6 @@ from __future__ import division
import numpy as np import numpy as np
from ..field import Field from ..field import Field
from ..multi.multi_field import MultiField from ..multi.multi_field import MultiField
from ..domain_tuple import DomainTuple
from .endomorphic_operator import EndomorphicOperator from .endomorphic_operator import EndomorphicOperator
...@@ -49,12 +48,13 @@ class ScalingOperator(EndomorphicOperator): ...@@ -49,12 +48,13 @@ class ScalingOperator(EndomorphicOperator):
""" """
def __init__(self, factor, domain): def __init__(self, factor, domain):
from ..sugar import makeDomain
super(ScalingOperator, self).__init__() super(ScalingOperator, self).__init__()
if not np.isscalar(factor): if not np.isscalar(factor):
raise TypeError("Scalar required") raise TypeError("Scalar required")
self._factor = factor self._factor = factor
self._domain = DomainTuple.make(domain) self._domain = makeDomain(domain)
def apply(self, x, mode): def apply(self, x, mode):
self._check_input(x, mode) self._check_input(x, mode)
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