Skip to content

Commit

Permalink
Make is_negatively_weighted dispatchable (#7352)
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknw committed Mar 20, 2024
1 parent 53c0513 commit e71bd8a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions networkx/classes/function.py
Expand Up @@ -1038,6 +1038,7 @@ def is_weighted(G, edge=None, weight="weight"):
return all(weight in data for u, v, data in G.edges(data=True))


@nx._dispatchable(edge_attrs="weight")
def is_negatively_weighted(G, edge=None, weight="weight"):
"""Returns True if `G` has negatively weighted edges.
Expand Down

0 comments on commit e71bd8a

Please sign in to comment.