Commit e6c68918 authored by Martin Reinecke's avatar Martin Reinecke
Browse files


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