Commit 8072a1fc authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

NestedBlockState: fix initialization

parent ba388c14
......@@ -93,18 +93,16 @@ class NestedBlockState(object):
if bs is None:
bs = [None]
self.levels = [base_type(g, b=bs[0], **self.state_args)]
self.levels = [base_type(g, b=bs[0] if bs is not None else None,
if bs is None:
if base_type is OverlapBlockState:
N = 2 * self.levels[0].get_N()
N = self.levels[0].get_N()
L = int(numpy.ceil(numpy.log2(N)))
bs += [None] * L
bs = [None] * (L + 1)
for i, b in enumerate(bs[1:]):
state = self.levels[-1]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment