Skip to content

Commit

Permalink
fixed bug in particle counting
Browse files Browse the repository at this point in the history
  • Loading branch information
skuschel committed Jan 6, 2015
1 parent 97467fa commit 1e6a536
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postpic/analyzer/particles.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def uncompress(self):
def __len__(self): # = number of particles
# find a valid dataset to count number of paricles
if self._compressboollist is not None:
return len(self._compressboollist)
return np.count_nonzero(self._compressboollist)
for key in self._atomicprops:
try:
# len(3) will yield a TypeError, len([3]) returns 1
Expand Down

0 comments on commit 1e6a536

Please sign in to comment.