Skip to content

Handle undefined hyperspherical mean directions#2080

Merged
FlorianPfaff merged 6 commits into
mainfrom
fix/undefined-hypersphere-mean-direction
May 18, 2026
Merged

Handle undefined hyperspherical mean directions#2080
FlorianPfaff merged 6 commits into
mainfrom
fix/undefined-hypersphere-mean-direction

Conversation

@FlorianPfaff
Copy link
Copy Markdown
Owner

Summary:

  • Raise ValueError when a numerical first moment is effectively zero instead of normalizing it.
  • Reuse the same normalization guard in the hyperhemispherical numerical mean-direction path.
  • Add a regression test for the full-sphere uniform distribution, whose mean direction is undefined.

Testing: Not run locally because the changes were made through the GitHub connector without a local checkout.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 94c289a. ± Comparison against base commit 420306b.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 19.4s
✅ JSON prettier 2 0 0 0 0.44s
✅ JSON v8r 2 0 0 2.46s
✅ MARKDOWN markdownlint 28 0 0 0 1.38s
✅ MARKDOWN markdown-table-formatter 28 0 0 0 0.37s
✅ PYTHON bandit 571 0 0 9.76s
✅ PYTHON black 571 31 0 0 18.31s
✅ PYTHON flake8 571 0 0 6.39s
✅ PYTHON isort 571 32 0 0 1.07s
✅ PYTHON mypy 571 0 0 7.37s
✅ PYTHON pylint 571 0 0 100.89s
✅ PYTHON ruff 571 32 0 0 0.13s
✅ REPOSITORY checkov yes no no 26.17s
✅ REPOSITORY gitleaks yes no no 14.97s
✅ REPOSITORY git_diff yes no no 0.1s
✅ REPOSITORY osv-scanner yes no no 1.0s
✅ REPOSITORY secretlint yes no no 9.79s
✅ REPOSITORY syft yes no no 3.24s
✅ REPOSITORY trivy-sbom yes no no 4.08s
✅ REPOSITORY trufflehog yes no no 21.77s
✅ YAML prettier 5 0 0 0 0.54s
✅ YAML v8r 5 0 0 5.3s
✅ YAML yamllint 5 0 0 0.49s

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

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters PYTHON_PYLINT,PYTHON_BLACK,PYTHON_FLAKE8,PYTHON_ISORT,PYTHON_BANDIT,PYTHON_MYPY,PYTHON_RUFF,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

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

@FlorianPfaff
Copy link
Copy Markdown
Owner Author

@copilot Fix merge conflicts and CI/CD issues

…here-mean-direction

# Conflicts:
#	src/pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py
#	src/pyrecest/distributions/hypersphere_subset/abstract_hypersphere_subset_distribution.py

Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 18, 2026

@copilot Fix merge conflicts and CI/CD issues

Done in 242bc00. I merged the latest main into this branch, resolved the remaining conflicts in the hypersphere subset files, and verified the previously failing CI areas locally on PYRECEST_BACKEND=pytorch (including test_hypercylindrical_dirac_distribution.py and test_kernel_sme_filter.py), which now pass.

@FlorianPfaff FlorianPfaff merged commit ab0420f into main May 18, 2026
18 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.

2 participants