Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
graph-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tiago Peixoto
graph-tool
Commits
254b7f3a
Commit
254b7f3a
authored
Jul 22, 2015
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accept also iterables as filters in GraphView
parent
2bbbdf08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/graph_tool/__init__.py
src/graph_tool/__init__.py
+3
-2
No files found.
src/graph_tool/__init__.py
View file @
254b7f3a
...
...
@@ -112,6 +112,7 @@ import weakref
import
copy
import
textwrap
import
io
import
collections
if
sys
.
version_info
<
(
3
,):
import
StringIO
...
...
@@ -2487,7 +2488,7 @@ class GraphView(Graph):
if
vfilt
is
not
None
:
if
type
(
vfilt
)
is
not
PropertyMap
:
vmap
=
self
.
new_vertex_property
(
"bool"
)
if
is
subclass
(
type
(
vfilt
),
numpy
.
ndarray
):
if
is
instance
(
vfilt
,
collections
.
Iterable
):
vmap
.
fa
=
vfilt
else
:
for
v
in
g
.
vertices
():
...
...
@@ -2507,7 +2508,7 @@ class GraphView(Graph):
if
efilt
is
not
None
:
if
type
(
efilt
)
is
not
PropertyMap
:
emap
=
self
.
new_edge_property
(
"bool"
)
if
is
subclass
(
type
(
efilt
),
numpy
.
ndarray
):
if
is
instance
(
efilt
,
collections
.
Iterable
):
emap
.
fa
=
efilt
else
:
for
e
in
g
.
edges
():
...
...
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