Skip to content

[networkx] Allow scalar values with name in set_edge_attributes and set_node_attributes - #16611

Open
Fire162 wants to merge 1 commit into
python:mainfrom
Fire162:fix-networkx-set-attributes
Open

Fire162 wants to merge 1 commit into
python:mainfrom
Fire162:fix-networkx-set-attributes

Conversation

@Fire162

@Fire162 Fire162 commented Oct 24, 2026

Copy link
Copy Markdown

Fixes #16542

NetworkX supports passing scalar values to set_edge_attributes and set_node_attributes when name is provided (applying the scalar value to all edges or nodes). Added an overload accepting values: object, name: str to both functions.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

networkx.set_edge_attributes should support scalar value + name

1 participant