Add S2CondS2GridDistribution: conditional distribution on S²×S²#1590
Open
Add S2CondS2GridDistribution: conditional distribution on S²×S²#1590
Conversation
Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/5ab618f7-210c-4d7c-a7d7-2406930e6fc2 Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/5ab618f7-210c-4d7c-a7d7-2406930e6fc2 Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
FlorianPfaff
March 31, 2026 21:26
View session
❌MegaLinter analysis: Error
Detailed Issues❌ PYTHON / flake8 - 2 errors❌ PYTHON / pylint - 4 errors❌ PYTHON / ruff - 2 errorsSee 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
|
4424230 to
1ebcdac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Python port of the MATLAB
S2CondS2GridDistribution— a conditional distributionf(a|b)over the Cartesian product of two 2-spheres, represented by grid values.New class:
S2CondS2GridDistributionSdCondSdGridDistribution, restricting the grid to embedding dimension 3 (grid.shape == (n_points, 3))fix_dimandmarginalize_outto returnSphericalGridDistributioninstead of the genericHypersphericalGridDistributionfrom_functionfactory delegates to the parent withdim=6(S²×S²) and wraps the resultTests
Mirrors the MATLAB
S2CondS2GridDistributionTestsuite:fix_dim(2, point).mean_direction()recovers the conditioning pointfix_dimandmarginalize_outreturnSphericalGridDistributioninstances