Skip to content

Fix sampler edge cases#2117

Merged
FlorianPfaff merged 11 commits into
mainfrom
codex/fix-sampler-edge-cases-20260521
May 21, 2026
Merged

Fix sampler edge cases#2117
FlorianPfaff merged 11 commits into
mainfrom
codex/fix-sampler-edge-cases-20260521

Conversation

@FlorianPfaff
Copy link
Copy Markdown
Owner

@FlorianPfaff FlorianPfaff commented May 21, 2026

Summary

  • fix singleton Fibonacci Gaussian/grid samples so they no longer divide by zero and return finite centered representatives
  • make fixed-resolution spherical grids return the full longitude/latitude tensor product and validate positive resolutions
  • make Fibonacci-Hopf integer-density grids choose an integer circle count and validate circular grid density
  • fix SphericalGridDistribution.from_function(..., grid_type="driscoll_healy") so it unpacks the generated grid and uses an integer Driscoll-Healy degree
  • add regression coverage for the affected Euclidean, spherical/Hopf, circular, and Driscoll-Healy spherical-grid edge cases

Validation

  • Added focused regression tests in tests/test_euclidean_sampler.py, tests/test_hyperspherical_sampler.py, tests/test_hypertoroidal_sampler.py, and tests/distributions/test_spherical_grid_distribution_driscoll_healy.py
  • Did not run the full test suite locally in this environment

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 29.7s
✅ PYTHON black 8 7 0 0 3.11s
✅ PYTHON isort 8 7 0 0 0.42s
✅ REPOSITORY checkov yes no no 33.36s
✅ REPOSITORY gitleaks yes no no 17.18s
✅ REPOSITORY git_diff yes no no 0.05s
✅ REPOSITORY secretlint yes no no 11.47s
✅ REPOSITORY syft yes no no 2.45s
✅ REPOSITORY trivy-sbom yes no no 3.43s
✅ REPOSITORY trufflehog yes no no 23.01s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@FlorianPfaff FlorianPfaff enabled auto-merge (squash) May 21, 2026 12:09
@FlorianPfaff FlorianPfaff merged commit d13d78e into main May 21, 2026
19 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