Commit fe27ada4 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix issue in Overlap/Covariate/BlockState.__check_clabel()

parent 5908da56
......@@ -264,12 +264,12 @@ class BlockState(object):
deg_corr=self.deg_corr if deg_corr is None else deg_corr,
max_BE=self.max_BE, **kwargs)
if not state.__check_clabel():
if _bm_test() or not kwargs.get("fix_clabel", True) :
raise RuntimeError("Inconsistent clabel after copy!")
b = state.b.a + state.clabel.a * state.B
if not state.__check_clabel() and kwargs.get("fix_clabel", True):
b = state.b.fa + state.clabel.fa * state.B
continuous_map(b)
state = state.copy(b=b, fix_clabel=False)
if not state.__check_clabel():
raise RuntimeError("Inconsistent clabel after copy!")
return state
......
......@@ -509,12 +509,12 @@ class CovariateBlockState(BlockState):
eindex=self.total_state.eindex if self.overlap else None,
ec_done=ec is None)
if not state._BlockState__check_clabel():
if _bm_test() or not kwargs.get("fix_clabel", True) :
raise RuntimeError("Inconsistent clabel after copy!")
b = state.b.a + state.clabel.a * state.B
if not state._BlockState__check_clabel() and kwargs.get("fix_clabel", True):
b = state.b.fa + state.clabel.fa * state.B
continuous_map(b)
state = state.copy(b=b, fix_clabel=False)
if not state._BlockState__check_clabel():
raise RuntimeError("Inconsistent clabel after copy!")
return state
......
......@@ -281,12 +281,12 @@ class OverlapBlockState(BlockState):
deg_corr=self.deg_corr if deg_corr is None else deg_corr,
max_BE=self.max_BE)
if not state._BlockState__check_clabel():
if _bm_test() or not kwargs.get("fix_clabel", True) :
raise RuntimeError("Inconsistent clabel after copy!")
b = state.b.a + state.clabel.a * state.B
if not state._BlockState__check_clabel() and kwargs.get("fix_clabel", True):
b = state.b.fa + state.clabel.fa * state.B
continuous_map(b)
state = state.copy(b=b, fix_clabel=False)
if not state._BlockState__check_clabel():
raise RuntimeError("Inconsistent clabel after copy!")
return state
......
Markdown is supported
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