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
8e7b5ca3
Commit
8e7b5ca3
authored
Sep 26, 2018
by
Tiago Peixoto
Browse files
Fix issue with Graph.remove_vertex() when contiguous regions are given
parent
db474cff
Pipeline
#438
failed with stage
in 218 minutes and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/__init__.py
View file @
8e7b5ca3
...
...
@@ -2012,15 +2012,15 @@ class Graph(object):
vs
=
numpy
.
unique
(
vs
)[::
-
1
]
vmax
,
vmin
=
vs
[
0
],
vs
[
-
1
]
else
:
vmax
=
int
(
vertex
)
vmax
=
vmin
=
int
(
vertex
)
vs
=
numpy
.
asarray
((
vertex
,),
dtype
=
"int64"
)
if
vmax
>
back
:
raise
ValueError
(
"Vertex index %d is invalid"
%
vmax
)
# move / shift all known property maps
if
(
vmax
-
vmin
>=
len
(
vs
)
if
is_iter
else
vmax
!=
back
):
if
not
is_iter
:
vs
=
numpy
.
asarray
((
vertex
,),
dtype
=
"int64"
)
# (unless removing a contiguous range at the end)
if
vmax
-
vmin
>=
len
(
vs
)
or
vmax
!=
back
:
vfilt
=
self
.
get_vertex_filter
()[
0
]
if
vfilt
is
not
None
:
vfiltptr
=
vfilt
.
data_ptr
()
...
...
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