Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
e759eb60
Commit
e759eb60
authored
May 11, 2018
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow sandwiches without cheese
parent
4172a4cd
Pipeline
#28997
passed with stages
in 10 minutes and 27 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
nifty4/operators/sandwich_operator.py
nifty4/operators/sandwich_operator.py
+8
-3
No files found.
nifty4/operators/sandwich_operator.py
View file @
e759eb60
...
...
@@ -17,6 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
from
.endomorphic_operator
import
EndomorphicOperator
from
.scaling_operator
import
ScalingOperator
import
numpy
as
np
...
...
@@ -31,11 +32,15 @@ class SandwichOperator(EndomorphicOperator):
the cheese part
"""
def
__init__
(
self
,
bun
,
cheese
):
def
__init__
(
self
,
bun
,
cheese
=
None
):
super
(
SandwichOperator
,
self
).
__init__
()
self
.
_bun
=
bun
self
.
_cheese
=
cheese
self
.
_op
=
bun
.
adjoint
*
cheese
*
bun
if
cheese
is
None
:
self
.
_cheese
=
ScalingOperator
(
1.
,
bun
.
target
)
self
.
_op
=
bun
.
adjoint
*
bun
else
:
self
.
_cheese
=
cheese
self
.
_op
=
bun
.
adjoint
*
cheese
*
bun
@
property
def
domain
(
self
):
...
...
Write
Preview
Markdown
is supported
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