Use enumerate, rather than explicit count
This commit is contained in:
parent
e1d583f51d
commit
b113261c51
4
mce.py
4
mce.py
@ -312,9 +312,7 @@ class mce(object):
|
|||||||
"""
|
"""
|
||||||
blockCounts = zeros( (256,), 'uint64')
|
blockCounts = zeros( (256,), 'uint64')
|
||||||
|
|
||||||
i=0;
|
for i, cPos in enumerate(self.level.presentChunks, 1):
|
||||||
for cPos in self.level.presentChunks:
|
|
||||||
i += 1;
|
|
||||||
ch = self.level.getChunk(*cPos);
|
ch = self.level.getChunk(*cPos);
|
||||||
counts = bincount(ch.Blocks.ravel())
|
counts = bincount(ch.Blocks.ravel())
|
||||||
blockCounts[:counts.shape[0]] += counts
|
blockCounts[:counts.shape[0]] += counts
|
||||||
|
Reference in New Issue
Block a user