diff --git a/odl/set/space.py b/odl/set/space.py index 684644ab57c..23ff928e913 100644 --- a/odl/set/space.py +++ b/odl/set/space.py @@ -382,10 +382,10 @@ def __pow__(self, shape): >>> r2 ** 4 ProductSpace(rn(2), 4) - Multiple powers work as expected: + Multiple powers work "outside-in": >>> r2 ** (4, 2) - ProductSpace(ProductSpace(rn(2), 4), 2) + ProductSpace(ProductSpace(rn(2), 2), 4) """ from odl.space import ProductSpace @@ -395,7 +395,7 @@ def __pow__(self, shape): shape = tuple(shape) pspace = self - for n in shape: + for n in reversed(shape): pspace = ProductSpace(pspace, n) return pspace