Skip to content

Reject duplicate knots before constructing cubic spline intervals - #1440

Open
Afloat16 wants to merge 1 commit into
AtsushiSakai:masterfrom
Afloat16:fix/strictly-increasing-spline-knots
Open

Afloat16 wants to merge 1 commit into
AtsushiSakai:masterfrom
Afloat16:fix/strictly-increasing-spline-knots

Conversation

@Afloat16

Copy link
Copy Markdown

Reference issue

No matching submission found in the duplicate check. The separate final-knot issue in #1433 is outside this change.

What does this implement/fix?

Reject duplicate x coordinates before constructing zero-width cubic-spline intervals, using the existing ValueError validation path. Update the docstring to require strictly increasing knots.

Regression tests cover repeated knots, duplicate consecutive 2D waypoints, decreasing knots, and valid spline values and derivatives against SciPy.

Additional information

Validation: 15 regression tests passed with Python 3.13.15, NumPy 2.5.3 and SciPy 1.18.1. Ruff E/F checks (excluding E501) on the new test and git diff --check passed. The full project suite and upstream CI have not been run here.

CheckList

  • Did you add an unittest for your new example or defect fix?
  • Did you add documents for your new example? (No new example; constructor docstring updated.)
  • All CIs are green? (Pending upstream CI.)

@Afloat16
Afloat16 marked this pull request as ready for review September 29, 2026 08:52

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