Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
8072a1fc
Commit
8072a1fc
authored
Feb 06, 2022
by
Tiago Peixoto
Browse files
NestedBlockState: fix initialization
parent
ba388c14
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/inference/nested_blockmodel.py
View file @
8072a1fc
...
@@ -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
base_type
is
OverlapBlockState
:
N
=
2
*
self
.
levels
[
0
].
get_N
()
else
:
N
=
self
.
levels
[
0
].
get_N
()
L
=
int
(
numpy
.
ceil
(
numpy
.
log2
(
N
)))
if
bs
is
None
:
bs
+=
[
None
]
*
L
if
base_type
is
OverlapBlockState
:
N
=
2
*
self
.
levels
[
0
].
get_N
()
else
:
N
=
self
.
levels
[
0
].
get_N
()
L
=
int
(
numpy
.
ceil
(
numpy
.
log2
(
N
)))
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
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment