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
28e20607
Commit
28e20607
authored
Sep 15, 2015
by
Tiago Peixoto
Browse files
Speed up unpicking of PropertyMaps
parent
c998861d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/__init__.py
View file @
28e20607
...
...
@@ -852,13 +852,9 @@ class PropertyMap(object):
else
:
u
=
GraphView
(
g
,
skip_vfilt
=
True
,
skip_efilt
=
True
)
if
key_type
==
"v"
:
pmap
=
g
.
new_vertex_property
(
value_type
)
for
i
,
v
in
enumerate
(
u
.
vertices
()):
pmap
[
v
]
=
vals
[
i
]
pmap
=
g
.
new_vertex_property
(
value_type
,
vals
=
vals
)
elif
key_type
==
"e"
:
pmap
=
g
.
new_edge_property
(
value_type
)
for
i
,
e
in
enumerate
(
u
.
edges
()):
pmap
[
e
]
=
vals
[
i
]
pmap
=
g
.
new_edge_property
(
value_type
,
vals
=
vals
)
else
:
pmap
=
g
.
new_graph_property
(
value_type
)
pmap
[
g
]
=
vals
...
...
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