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
e5ab07fb
Commit
e5ab07fb
authored
4 months ago
by
Philipp Arras
Browse files
Options
Downloads
Patches
Plain Diff
Linearization: check that "[]" works only on MultiDomains
parent
8608678a
No related branches found
No related tags found
1 merge request
!994
Two small fixups
Pipeline
#237224
passed
4 months 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/linearization.py
+3
-0
3 additions, 0 deletions
src/linearization.py
with
3 additions
and
0 deletions
src/linearization.py
+
3
−
0
View file @
e5ab07fb
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
import
numpy
as
np
import
numpy
as
np
from
.multi_domain
import
MultiDomain
from
.operators.operator
import
Operator
from
.operators.operator
import
Operator
from
.sugar
import
makeOp
from
.sugar
import
makeOp
from
.utilities
import
check_object_identity
from
.utilities
import
check_object_identity
...
@@ -124,6 +125,8 @@ class Linearization(Operator):
...
@@ -124,6 +125,8 @@ class Linearization(Operator):
return
self
.
_metric
return
self
.
_metric
def
__getitem__
(
self
,
name
):
def
__getitem__
(
self
,
name
):
if
not
isinstance
(
self
.
domain
,
MultiDomain
):
return
NotImplemented
return
self
.
new
(
self
.
_val
[
name
],
self
.
_jac
.
ducktape_left
(
name
))
return
self
.
new
(
self
.
_val
[
name
],
self
.
_jac
.
ducktape_left
(
name
))
def
__neg__
(
self
):
def
__neg__
(
self
):
...
...
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