Skip to content

Commit

Permalink
mark the end of the loop explicitly.
Browse files Browse the repository at this point in the history
  • Loading branch information
rainwoodman committed Oct 23, 2017
1 parent a4bd776 commit 387d4c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nbodykit/base/catalogmesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,12 @@ def to_real_field(self, out=None, normalize=True):
pm.paint(p, mass=w * v, resampler=paintbrush, hold=True, out=real1)
pm.paint(p, mass=w * v, resampler=paintbrush, transform=shifted, hold=True, out=real2)

if self.interlaced:
# now the loop over particles is done

if not self.interlaced:
# nothing to do, toret is already filled.
pass
else:
# compose the two interlaced fields into the final result.
c1 = real1.r2c()
c2 = real2.r2c()
Expand Down

0 comments on commit 387d4c0

Please sign in to comment.