Skip to content

Fix pytest baseline geometry, NOBE, and NumPy issues#173

Merged
eggpig merged 1 commit into
pybind11from
fix/pytest-baseline-geometry-nobe-numpy
Jun 7, 2026
Merged

Fix pytest baseline geometry, NOBE, and NumPy issues#173
eggpig merged 1 commit into
pybind11from
fix/pytest-baseline-geometry-nobe-numpy

Conversation

@eggpig
Copy link
Copy Markdown
Collaborator

@eggpig eggpig commented Jun 7, 2026

Summary

  • make common_tangent_radian raise ValueError for invalid circle geometry instead of silently clamping impossible inputs
  • make NOBE_SH and NOBE_GA_SH reject empty graphs before indexing empty embedding results
  • make GraphML/GEXF NumPy type mapping compatible with NumPy 2.x, where np.float_ has been removed
  • update the GraphML NumPy float test to use the same compatibility pattern

Semantics

  • The geometry change only rejects cases where the distance is non-positive or too small for the requested tangent calculation, plus negative radii.
  • The NOBE change keeps the existing invalid K and topk behavior and adds an explicit empty-graph error.
  • The NumPy change keeps np.float64, np.float32, and np.float16 mappings unchanged, and falls back to np.float64 when np.float_ does not exist.

Verification

  • git diff --check
  • black --check and isort --check-only on changed files
  • focused pytest for geometry, NOBE, GEXF, and GraphML: 62 passed, 20 skipped without lxml
  • after installing lxml, GEXF/GraphML tests: 56 passed
  • manual checks for:
    • valid and invalid common_tangent_radian inputs
    • empty graph errors for NOBE_SH and NOBE_GA_SH
    • karate graph NOBE smoke checks
    • GraphML/GEXF writing with np.float64 on NumPy 2.0

Note

A local full pytest easygraph run was started but did not complete in a reasonable time on my machine, so I terminated it and relied on focused tests plus GitHub Actions for full-suite validation.

@eggpig eggpig merged commit a166042 into pybind11 Jun 7, 2026
7 of 12 checks passed
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.

1 participant