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
211f6788
Commit
211f6788
authored
Sep 22, 2011
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include `value_type` parameter in PropertyMap.copy()
parent
505e795f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/graph_tool/__init__.py
src/graph_tool/__init__.py
+4
-3
No files found.
src/graph_tool/__init__.py
View file @
211f6788
...
...
@@ -425,9 +425,10 @@ class PropertyMap(object):
return
(
"<PropertyMap object with key type '%s' and value type '%s',"
+
" for %s, at 0x%x>"
)
%
(
k
,
self
.
value_type
(),
g
,
id
(
self
))
def
copy
(
self
):
"""Return a copy of the property map."""
return
self
.
get_graph
().
copy_property
(
self
)
def
copy
(
self
,
value_type
=
None
):
"""Return a copy of the property map. If ``value_type`` is specified,
the value type is converted to the chosen type."""
return
self
.
get_graph
().
copy_property
(
self
,
value_type
=
value_type
)
def
get_graph
(
self
):
"""Get the graph class to which the map refers."""
...
...
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