Skip to content

Reject reversed scalar hypertoroidal integration bounds - #5401

Merged
FlorianPfaff merged 1 commit into
mainfrom
chatgpt/fix-hypertoroidal-scalar-boundary-order
Aug 23, 2026
Merged

Reject reversed scalar hypertoroidal integration bounds#5401
FlorianPfaff merged 1 commit into
mainfrom
chatgpt/fix-hypertoroidal-scalar-boundary-order

Conversation

@FlorianPfaff

Copy link
Copy Markdown
Owner

Summary

Fix HypertoroidalUniformDistribution.integrate(...) so scalar 1-D boundaries obey the same increasing-boundary contract as vector boundaries.

The current helper special-cases scalar limits and permits (1.0, 0.0), returning a negative probability mass. This contradicts the existing regression test test_integrate_rejects_reversed_one_dimensional_boundaries, which already verifies both scalar and length-one vector inputs.

Fix

Remove the scalar bypass in _validate_boundary_order, so all supported boundary representations reject right < left with the existing ValueError.

Regression

The repository already contains tests/distributions/test_hypertoroidal_uniform_scalar_boundary_order.py; this patch makes its scalar case pass and also resolves the unrelated failure observed in the full CI artifacts of the open bug-fix PRs.

@FlorianPfaff
FlorianPfaff merged commit e1f9cef into main Aug 23, 2026
14 of 24 checks passed
FlorianPfaff added a commit that referenced this pull request Aug 23, 2026
Revert the scalar-boundary regression introduced by #5401 while preserving reversed vector-bound validation.
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