diff --git a/nifty5/operators/mask_operator.py b/nifty5/operators/mask_operator.py index ef61ac2502f8b53e8bd411eefce6a059f2743551..87407ee9a4bf4a44ab517c04a15ceca867aacc77 100644 --- a/nifty5/operators/mask_operator.py +++ b/nifty5/operators/mask_operator.py @@ -24,6 +24,9 @@ from ..field import Field from .linear_operator import LinearOperator +# MR FIXME: this needs a redesign to avoid most _global_data() calls +# Possible approach: keep everything living on `domain` distributed and only +# collect the unstructured Fields. class MaskOperator(LinearOperator): def __init__(self, mask): if not isinstance(mask, Field): diff --git a/nifty5/operators/slope_operator.py b/nifty5/operators/slope_operator.py index cbeefb3a6081bd701f6576d6a641c49424120523..4e2f851c42c53d291e359d0cfe90ed478a1fd551 100644 --- a/nifty5/operators/slope_operator.py +++ b/nifty5/operators/slope_operator.py @@ -25,9 +25,8 @@ class SlopeOperator(LinearOperator): rng = np.arange(target.shape[i]) tmp = np.minimum( rng, target.shape[i] + 1 - rng) * target.bindistances[i] - fst_dims = (1,) * i - lst_dims = (1,) * (self.ndim - i - 1) - self.pos[i] += tmp.reshape(fst_dims + (shape[i],) + lst_dims) + self.pos[i] += tmp.reshape( + (1,)*i + (shape[i],) + (1,)*(self.ndim-i-1)) @property def domain(self):