PYTHON: Determine toplev only for chunks with dblocks > 0.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
d217d092ab
commit
51cc3ea83b
@ -140,7 +140,7 @@ class Amun:
|
||||
Add additional attributes.
|
||||
"""
|
||||
if not 'toplev' in self.attributes:
|
||||
self.attributes['toplev'] = max([self.chunks[n]['levels'].max() for n in range(self.attributes['nchunks'])])
|
||||
self.attributes['toplev'] = max([max(chunk['levels']) if chunk['dblocks'] > 0 else 1 for chunk in self.chunks.values()])
|
||||
|
||||
if not 'xlen' in self.attributes:
|
||||
self.attributes['xlen'] = self.attributes['xmax'] - self.attributes['xmin']
|
||||
|
Loading…
x
Reference in New Issue
Block a user