Skip to content

Commit

Permalink
fall back to adj.leaves if particles.final missing #174
Browse files Browse the repository at this point in the history
  • Loading branch information
jacanchaplais committed Mar 1, 2024
1 parent 6428304 commit 6402157
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion graphicle/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2751,7 +2751,10 @@ def hard_mask(self) -> MaskGroup:
@property
def final(self) -> MaskArray:
"""Boolean array indicating final state in particle set."""
return self.particles.final
data = self.particles.final
if (not data) and self.adj:
return self.adj.leaves
return data

@property
def edges(self) -> base.VoidVector:
Expand Down

0 comments on commit 6402157

Please sign in to comment.