Commit c0b169f1 authored by Theo Steininger's avatar Theo Steininger
Browse files

PowerSpace now uses 'default_distribution_strategy' as a default.

parent 1b46ab5f
......@@ -19,9 +19,11 @@
import ast
import numpy as np
from d2o import distributed_data_object
from d2o import distributed_data_object,\
from 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 "
if not (isinstance(harmonic_partner, Space) and
raise ValueError("harmonic_partner must be a harmonic space.")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment