Skip to content

Update graph_indicator in remove_nodes - #717

Merged
CarloLucibello merged 3 commits into
JuliaGraphs:masterfrom
parth-patel010:fix/remove-nodes-graph-indicator
Nov 7, 2026
Merged

CarloLucibello merged 3 commits into
JuliaGraphs:masterfrom
parth-patel010:fix/remove-nodes-graph-indicator

Conversation

@parth-patel010

Copy link
Copy Markdown
Contributor

Fixes #716

remove_nodes passed g.graph_indicator through unchanged, so after removing nodes from a batched graph the indicator still had one entry per original node and unbatch/getgraph failed with a BoundsError.

FIX

  • index graph_indicator with the kept nodes, the same way ndata is already handled (nothing stays nothing for non-batched graphs)

TESTS

  • add a remove_nodes on batched graph test item that checks the new graph_indicator, node features, and that unbatch/getgraph give the expected component graphs
  • the new test fails on master (wrong indicator + BoundsError) and passes with the fix; all of GNNGraphs/test/transform.jl passes locally (306 tests, Julia 1.12.1)
  • added a CHANGELOG entry under GNNGraphs.jl Unreleased

@CarloLucibello
CarloLucibello merged commit 3b4ed42 into JuliaGraphs:master Nov 7, 2026
12 checks passed
CarloLucibello added a commit that referenced this pull request Nov 11, 2026
…735)

* Remove local setup files and notes committed in #729

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix changelog inconsistencies

Move #717 and #728 out of the already tagged releases, link the PRs that
introduced each fix, sort the link references and use one date separator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep changelog edits out of PRs in AGENTS.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove_nodes doesn't update graph_indicator on batched graphs

2 participants