Network.edges_where_predicate
-
Network.
edges_where_predicate
(predicate, data=False)[source] Get edges for which a certain condition or set of conditions is true using a lambda function.
- Parameters
predicate (callable) – The condition you want to evaluate. The callable takes 2 parameters: a key
(u, v)
tuple andattr
and should returnTrue
orFalse
.data (bool, optional) – Yield the nodes and their data attributes. Default is
False
.
- Yields
tuple – The next edge identifier (u, v), if
data
isFalse
. Otherwise, the next edge identifier and its attributes as a ((u, v), attr) tuple.
Examples
>>>