Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
e6c68918
There was a problem fetching the pipeline summary.
Commit
e6c68918
authored
7 years ago
by
Martin Reinecke
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
67660e26
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nifty4/operators/scaling_operator.py
+2
-2
2 additions, 2 deletions
nifty4/operators/scaling_operator.py
with
2 additions
and
2 deletions
nifty4/operators/scaling_operator.py
+
2
−
2
View file @
e6c68918
...
@@ -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
=
Domain
Tuple
.
make
(
domain
)
self
.
_domain
=
make
Domain
(
domain
)
def
apply
(
self
,
x
,
mode
):
def
apply
(
self
,
x
,
mode
):
self
.
_check_input
(
x
,
mode
)
self
.
_check_input
(
x
,
mode
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment