Skip to content
GitLab
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
7573f57e
Commit
7573f57e
authored
Feb 17, 2014
by
Tiago Peixoto
Browse files
Only initialize non-filtered properties in BlockState.__init_()
parent
9d541760
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/community/blockmodel.py
View file @
7573f57e
...
...
@@ -88,12 +88,12 @@ class BlockState(object):
self
.
g
=
g
if
eweight
is
None
:
eweight
=
g
.
new_edge_property
(
"int"
)
eweight
.
a
=
1
eweight
.
f
a
=
1
elif
eweight
.
value_type
()
!=
"int32_t"
:
eweight
=
eweight
.
copy
(
value_type
=
"int32_t"
)
if
vweight
is
None
:
vweight
=
g
.
new_vertex_property
(
"int"
)
vweight
.
a
=
1
vweight
.
f
a
=
1
elif
vweight
.
value_type
()
!=
"int32_t"
:
vweight
=
vweight
.
copy
(
value_type
=
"int32_t"
)
self
.
eweight
=
eweight
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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