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

NestedBlockState: fix initialization

parent ba388c14
...@@ -93,18 +93,16 @@ class NestedBlockState(object): ...@@ -93,18 +93,16 @@ class NestedBlockState(object):
recs_dl=False, recs_dl=False,
beta_dl=1.) beta_dl=1.)
if bs is None: self.levels = [base_type(g, b=bs[0] if bs is not None else None,
bs = [None] **self.state_args)]
self.levels = [base_type(g, b=bs[0], **self.state_args)]
if bs is None:
if base_type is OverlapBlockState: if base_type is OverlapBlockState:
N = 2 * self.levels[0].get_N() N = 2 * self.levels[0].get_N()
else: else:
N = self.levels[0].get_N() N = self.levels[0].get_N()
L = int(numpy.ceil(numpy.log2(N))) L = int(numpy.ceil(numpy.log2(N)))
bs += [None] * L bs = [None] * (L + 1)
for i, b in enumerate(bs[1:]): for i, b in enumerate(bs[1:]):
state = self.levels[-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