Skip to content

Reject unpaired coordinates before fitting a circle - #1497

Open
Afloat16 wants to merge 1 commit into
AtsushiSakai:masterfrom
Afloat16:fix/circle-paired-coordinates
Open

Afloat16 wants to merge 1 commit into
AtsushiSakai:masterfrom
Afloat16:fix/circle-paired-coordinates

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 6, 2026

Copy link
Copy Markdown

Reference issue

Reproduced on master at 61a8b0b.

What does this implement/fix?

The least-squares matrix combines independent sums of x and y with terms computed by zip. Unequal input lengths can silently produce a circle from inconsistent observations. Enforce the documented ValueError before building the system.

Additional information

Both directions of the length mismatch are exercised with otherwise noncollinear points. The regression failed on the original implementation and passed after the fix. Tested with Python 3.13.17 and the repository's pinned requirements. The modified module's tests and examples passed, Ruff passed, and the Sphinx HTML build succeeded.

CheckList

  • Added regression coverage for the defect.
  • Updated the example documentation.
  • CI results pending.

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.

1 participant