Skip to content

Validate the subspace constraint for spherical tangent vectors - #267

Merged
ferrine merged 2 commits into
geoopt:masterfrom
Afloat16:fix-sphere-subspace-tangent
Oct 18, 2026
Merged

ferrine merged 2 commits into
geoopt:masterfrom
Afloat16:fix-sphere-subspace-tangent

Conversation

@Afloat16

Copy link
Copy Markdown
Contributor

For a sphere restricted by intersection or complement, a tangent vector must belong to the allowed subspace as well as being orthogonal to the base point. The tangent checker currently only tests orthogonality, so it accepts vectors normal to the allowed subspace.

Check that the vector is unchanged by the existing subspace projection. Preserve the existing orthogonality failure and expose the violated subspace constraint through the assertion message.

Validation on current master with Python 3.12 / PyTorch 2.8.0 CPU and full native package imports:

  • The same 7 focused cases give 4 failures and 3 passing controls on master, then all 7 pass with the patch.
  • All original test_manifold_basic.py cases plus the focused file: 1,897 passed, 310 existing parameterized skips.
  • Cases cover intersection/complement constraints, scalar and mixed batches, projected vectors, zero vectors, and the unconstrained sphere.
  • Production Ruff, focused-test Ruff and git diff --check pass.

The branch preserves both new master commits. The complete repository suite, CUDA and the Sphinx documentation gate were not run for this change.

@ferrine
ferrine merged commit 697db3d into geoopt:master Oct 18, 2026
1 check 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.

2 participants