Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
e6c68918
Commit
e6c68918
authored
May 22, 2018
by
Martin Reinecke
Browse files
fix
parent
67660e26
Pipeline
#29564
passed with stages
in 4 minutes and 47 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty4/operators/scaling_operator.py
View file @
e6c68918
...
...
@@ -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
=
Domain
Tuple
.
make
(
domain
)
self
.
_domain
=
make
Domain
(
domain
)
def
apply
(
self
,
x
,
mode
):
self
.
_check_input
(
x
,
mode
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment