Skip to content
GitLab
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
705c8bc7
Commit
705c8bc7
authored
May 28, 2020
by
Lukas Platz
Browse files
cleanup Linearization.prepend_jac
parent
17c15fd4
Pipeline
#75690
passed with stages
in 13 minutes and 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/linearization.py
View file @
705c8bc7
...
...
@@ -19,6 +19,7 @@ import numpy as np
from
.sugar
import
makeOp
from
.operators.operator
import
Operator
from
.operators.sandwich_operator
import
SandwichOperator
class
Linearization
(
Operator
):
...
...
@@ -65,10 +66,7 @@ class Linearization(Operator):
return
self
.
make_var
(
self
.
_val
,
self
.
_want_metric
)
def
prepend_jac
(
self
,
jac
):
metric
=
None
if
self
.
_metric
is
not
None
:
from
.operators.sandwich_operator
import
SandwichOperator
metric
=
None
if
self
.
_metric
is
None
else
SandwichOperator
.
make
(
jac
,
self
.
_metric
)
metric
=
None
if
self
.
_metric
is
None
else
SandwichOperator
.
make
(
jac
,
self
.
_metric
)
return
self
.
new
(
self
.
_val
,
self
.
_jac
@
jac
,
metric
)
@
property
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment