Skip to content

Commit

Permalink
Fix wrong LinearSpace.__pow__
Browse files Browse the repository at this point in the history
  • Loading branch information
kohr-h committed Feb 26, 2019
1 parent 6aab222 commit 1eadcee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions odl/set/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 1eadcee

Please sign in to comment.