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
11
Merge Requests
11
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
c0b169f1
Commit
c0b169f1
authored
Jul 23, 2017
by
Theo Steininger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PowerSpace now uses 'default_distribution_strategy' as a default.
parent
1b46ab5f
Pipeline
#15426
passed with stages
in 12 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
nifty/spaces/power_space/power_space.py
nifty/spaces/power_space/power_space.py
+11
-2
No files found.
nifty/spaces/power_space/power_space.py
View file @
c0b169f1
...
...
@@ -19,9 +19,11 @@
import
ast
import
numpy
as
np
from
d2o
import
distributed_data_object
from
d2o
import
distributed_data_object
,
\
STRATEGIES
as
DISTRIBUTION_STRATEGIES
from
nifty.spaces.space
import
Space
from
nifty.config
import
nifty_configuration
as
gc
class
PowerSpace
(
Space
):
...
...
@@ -87,11 +89,18 @@ class PowerSpace(Space):
# ---Overwritten properties and methods---
def
__init__
(
self
,
harmonic_partner
,
distribution_strategy
=
'not'
,
def
__init__
(
self
,
harmonic_partner
,
distribution_strategy
=
None
,
logarithmic
=
None
,
nbin
=
None
,
binbounds
=
None
):
super
(
PowerSpace
,
self
).
__init__
()
self
.
_ignore_for_hash
+=
[
'_pindex'
,
'_kindex'
,
'_rho'
]
if
distribution_strategy
is
None
:
distribution_strategy
=
gc
[
'default_distribution_strategy'
]
elif
distribution_strategy
not
in
DISTRIBUTION_STRATEGIES
[
'global'
]:
raise
ValueError
(
"distribution_strategy must be a global-type "
"strategy."
)
if
not
(
isinstance
(
harmonic_partner
,
Space
)
and
harmonic_partner
.
harmonic
):
raise
ValueError
(
"harmonic_partner must be a harmonic space."
)
...
...
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