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
7a74a21e
Commit
7a74a21e
authored
4 years ago
by
Philipp Arras
Browse files
Options
Downloads
Patches
Plain Diff
Fixup
parent
0f7e847e
No related branches found
No related tags found
2 merge requests
!589
Fixup get_sqrt()
,
!583
Restructure tensors
Pipeline
#88487
passed
4 years ago
Stage: build_docker
Stage: test
Stage: demo_runs
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/operators/sandwich_operator.py
+2
-0
2 additions, 0 deletions
src/operators/sandwich_operator.py
with
2 additions
and
0 deletions
src/operators/sandwich_operator.py
+
2
−
0
View file @
7a74a21e
...
...
@@ -59,6 +59,8 @@ class SandwichOperator(EndomorphicOperator):
if
not
isinstance
(
bun
,
LinearOperator
):
raise
TypeError
(
"
bun must be a linear operator
"
)
if
isinstance
(
bun
,
ScalingOperator
):
if
cheese
is
None
:
return
bun
@
bun
return
cheese
.
scale
(
abs
(
bun
.
_factor
)
**
2
)
if
cheese
is
not
None
and
not
isinstance
(
cheese
,
LinearOperator
):
raise
TypeError
(
"
cheese must be a linear operator or None
"
)
...
...
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