Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tiago Peixoto
graph-tool
Commits
f327fcb4
Commit
f327fcb4
authored
Feb 17, 2017
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generate_sbm(): fix bug when B=1
parent
fb37166a
Pipeline
#263
passed with stage
in 235 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
src/graph_tool/generation/__init__.py
src/graph_tool/generation/__init__.py
+3
-0
No files found.
src/graph_tool/generation/__init__.py
View file @
f327fcb4
...
@@ -978,6 +978,9 @@ def generate_sbm(b, probs, out_degs=None, in_degs=None, directed=False):
...
@@ -978,6 +978,9 @@ def generate_sbm(b, probs, out_degs=None, in_degs=None, directed=False):
s
=
s
[
idx
]
s
=
s
[
idx
]
p
=
numpy
.
squeeze
(
numpy
.
array
(
probs
[
r
,
s
]))
p
=
numpy
.
squeeze
(
numpy
.
array
(
probs
[
r
,
s
]))
if
len
(
p
.
shape
)
==
0
:
# B == 1 special case
p
=
numpy
.
array
([
p
])
g
.
set_directed
(
directed
)
g
.
set_directed
(
directed
)
libgraph_tool_generation
.
gen_sbm
(
g
.
_Graph__graph
,
libgraph_tool_generation
.
gen_sbm
(
g
.
_Graph__graph
,
...
...
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