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
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
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
4fa63fe3
Commit
4fa63fe3
authored
Nov 12, 2019
by
Philipp Haim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge sugar.get_default_codomain from Independent_SLAmplitudes
parent
7b2f7e8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
nifty5/sugar.py
nifty5/sugar.py
+5
-2
No files found.
nifty5/sugar.py
View file @
4fa63fe3
...
...
@@ -424,14 +424,17 @@ def get_default_codomain(domainoid, space=None):
codomain. `domain[space]` must be of class `RGSpace`.
"""
from
.domains.rg_space
import
RGSpace
from
.domains.hp_space
import
HPSpace
from
.domains.gl_space
import
GLSpace
from
.domains.lm_space
import
LMSpace
if
isinstance
(
domainoid
,
RGSpace
):
return
domainoid
.
get_default_codomain
()
if
not
isinstance
(
domainoid
,
DomainTuple
):
raise
TypeError
(
'Works only on RGSpaces and DomainTuples containing those'
)
space
=
utilities
.
infer_space
(
domainoid
,
space
)
if
not
isinstance
(
domainoid
[
space
],
RGSpace
):
raise
TypeError
(
"can only codomain
RGS
paces"
)
if
not
isinstance
(
domainoid
[
space
],
(
RGSpace
,
HPSpace
,
GLSpace
,
LMSpace
)
):
raise
TypeError
(
"can only codomain
structrued s
paces"
)
ret
=
[
dom
for
dom
in
domainoid
]
ret
[
space
]
=
domainoid
[
space
].
get_default_codomain
()
return
DomainTuple
.
make
(
ret
)
...
...
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