Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
graph-tool
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tiago Peixoto
graph-tool
Commits
eb3fe62a
Commit
eb3fe62a
authored
Apr 15, 2018
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BlockState.sample_graph(): Fix problem with unweighted graphs
parent
20244ea5
Pipeline
#407
passed with stage
in 206 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
blockmodel.py
src/graph_tool/inference/blockmodel.py
+6
-2
No files found.
src/graph_tool/inference/blockmodel.py
View file @
eb3fe62a
...
...
@@ -2259,10 +2259,14 @@ class BlockState(object):
"""
in_degs
=
out_degs
=
None
if
isinstance
(
self
.
eweight
,
libinference
.
unity_eprop_t
):
eweight
=
None
else
:
eweight
=
self
.
eweight
if
self
.
deg_corr
:
out_degs
=
self
.
g
.
degree_property_map
(
"out"
,
weight
=
self
.
eweight
)
.
fa
out_degs
=
self
.
g
.
degree_property_map
(
"out"
,
weight
=
eweight
)
.
fa
if
self
.
g
.
is_directed
():
in_degs
=
self
.
g
.
degree_property_map
(
"in"
,
weight
=
self
.
eweight
)
.
fa
in_degs
=
self
.
g
.
degree_property_map
(
"in"
,
weight
=
eweight
)
.
fa
else
:
in_degs
=
None
probs
=
adjacency
(
self
.
bg
,
weight
=
self
.
mrs
)
.
T
...
...
Write
Preview
Markdown
is supported
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