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
23b0ed81
There was a problem fetching the pipeline summary.
Commit
23b0ed81
authored
7 years ago
by
Martin Reinecke
Browse files
Options
Downloads
Patches
Plain Diff
bug fix
parent
039a629a
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nifty4/operators/chain_operator.py
+3
-1
3 additions, 1 deletion
nifty4/operators/chain_operator.py
nifty4/operators/sum_operator.py
+2
-0
2 additions, 0 deletions
nifty4/operators/sum_operator.py
with
5 additions
and
1 deletion
nifty4/operators/chain_operator.py
+
3
−
1
View file @
23b0ed81
...
...
@@ -64,7 +64,7 @@ class ChainOperator(LinearOperator):
opsnew
[
i
]
=
opsnew
[
i
].
_scale
(
fct
)
fct
=
1.
break
if
fct
!=
1
:
if
fct
!=
1
or
len
(
opsnew
)
==
0
:
# have to add the scaling operator at the end
opsnew
.
append
(
ScalingOperator
(
fct
,
lastdom
))
ops
=
opsnew
...
...
@@ -83,6 +83,8 @@ class ChainOperator(LinearOperator):
@staticmethod
def
make
(
ops
):
ops
=
tuple
(
ops
)
if
len
(
ops
)
==
0
:
raise
ValueError
(
"
ops is empty
"
)
ops
=
ChainOperator
.
simplify
(
ops
)
if
len
(
ops
)
==
1
:
return
ops
[
0
]
...
...
This diff is collapsed.
Click to expand it.
nifty4/operators/sum_operator.py
+
2
−
0
View file @
23b0ed81
...
...
@@ -108,6 +108,8 @@ class SumOperator(LinearOperator):
def
make
(
ops
,
neg
):
ops
=
tuple
(
ops
)
neg
=
tuple
(
neg
)
if
len
(
ops
)
==
0
:
raise
ValueError
(
"
ops is empty
"
)
if
len
(
ops
)
!=
len
(
neg
):
raise
ValueError
(
"
length mismatch between ops and neg
"
)
ops
,
neg
=
SumOperator
.
simplify
(
ops
,
neg
)
...
...
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