Skip to content

Commit 4a50ed7

Browse files
timtreisclaude
andcommitted
Remove unreachable adjacency shape validation
AnnData rejects mismatched obsp matrices at assignment time, making this check dead code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9b1463e commit 4a50ed7

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

src/spatialdata_plot/pl/render.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,12 +1841,6 @@ def _render_graph(
18411841

18421842
adjacency = table.obsp[obsp_key]
18431843

1844-
if adjacency.shape[0] != table.n_obs:
1845-
raise ValueError(
1846-
f"Adjacency matrix shape {adjacency.shape} does not match table.n_obs ({table.n_obs}). "
1847-
"The graph must be computed on the full table, not a subset."
1848-
)
1849-
18501844
# Get the spatial element
18511845
if element_name in sdata.shapes:
18521846
element = sdata.shapes[element_name]

0 commit comments

Comments
 (0)