Skip to content

Commit

Permalink
Convert list comprehension to if/else block to rectify meaning
Browse files Browse the repository at this point in the history
  • Loading branch information
sadielbartholomew committed Feb 23, 2022
1 parent 2671c96 commit 55e5223
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cf/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -10956,9 +10956,10 @@ def flip(self, axes=None, inplace=False, i=False):
if not iaxes:
return d

index = [
slice(None, None, -1) if i in iaxes else slice(None) for i in iaxes
]
if i in iaxes:
index = [slice(None, None, -1)]
else:
index = [slice(None) for i in iaxes]

dx = d._get_dask()
dx = dx[tuple(index)]
Expand Down

0 comments on commit 55e5223

Please sign in to comment.