Skip to content

Added partially wrapped normal distribution for SE(2)#1092

Open
FlorianPfaff wants to merge 3 commits intomainfrom
se2pwnnew
Open

Added partially wrapped normal distribution for SE(2)#1092
FlorianPfaff wants to merge 3 commits intomainfrom
se2pwnnew

Conversation

@FlorianPfaff
Copy link
Copy Markdown
Owner

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 14, 2025

Test Results

0 files   -    12  0 suites   - 12   0s ⏱️ - 4h 5m 57s
0 tests  -   747  0 ✅  -   747  0 💤 ±    0  0 ❌ ±0 
0 runs   - 9 248  0 ✅  - 7 736  0 💤  - 1 512  0 ❌ ±0 

Results for commit b86c4cf. ± Comparison against base commit 82aa0d9.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 14, 2025

MegaLinter analysis: Error

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 7.15s
✅ JSON prettier 2 0 0 0 0.76s
✅ JSON v8r 2 0 0 3.16s
✅ MARKDOWN markdownlint 1 0 0 0 0.65s
✅ MARKDOWN markdown-table-formatter 1 0 0 0 0.26s
✅ PYTHON bandit 249 0 0 3.05s
✅ PYTHON black 249 2 0 0 4.38s
✅ PYTHON flake8 249 0 0 1.77s
✅ PYTHON isort 249 2 0 0 0.48s
✅ PYTHON mypy 249 0 0 4.05s
❌ PYTHON pylint 249 1 0 68.93s
✅ PYTHON ruff 249 2 0 0 0.04s
✅ REPOSITORY checkov yes no no 21.69s
✅ REPOSITORY gitleaks yes no no 5.62s
✅ REPOSITORY git_diff yes no no 0.02s
✅ REPOSITORY secretlint yes no no 5.75s
✅ REPOSITORY syft yes no no 3.17s
✅ REPOSITORY trivy-sbom yes no no 1.7s
✅ REPOSITORY trufflehog yes no no 20.72s
✅ YAML prettier 4 0 0 0 0.48s
✅ YAML v8r 4 0 0 6.11s
✅ YAML yamllint 4 0 0 0.48s

Detailed Issues

❌ PYTHON / pylint - 1 error
************* Module pyrecest.tests.distributions.test_se2_partially_wrapped_normal_distribution
pyrecest/tests/distributions/test_se2_partially_wrapped_normal_distribution.py:8:0: R0902: Too many instance attributes (9/7) (too-many-instance-attributes)

------------------------------------
Your code has been rated at 10.00/10

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.4.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_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 FlorianPfaff changed the title Added partially wrapped normal distribution Added partially wrapped normal distribution for SE(2) Apr 14, 2025
@FlorianPfaff FlorianPfaff force-pushed the main branch 3 times, most recently from cbbee9b to 22baafb Compare December 1, 2025 20:52
@FlorianPfaff
Copy link
Copy Markdown
Owner Author

@copilot increase tolerance

FAILED pyrecest/tests/distributions/test_se2_partially_wrapped_normal_distribution.py::SE2PWNDistributionTest::test_integral - ValueError: not enough values to unpack (expected 2, got 1)
FAILED pyrecest/tests/distributions/test_se2_partially_wrapped_normal_distribution.py::SE2PWNDistributionTest::test_pdf - AssertionError:
Not equal to tolerance rtol=1e-10, atol=0

Mismatched elements: 20 / 20 (100%)
Max absolute difference among violations: 0.00957097
Max relative difference among violations: 7.44859227
ACTUAL: array([4.554286e-135, 9.156780e-135, 1.793513e-062, 3.709389e-064,
3.370479e-062, 1.491250e-018, 4.967011e-019, 2.709908e-018,
5.768815e-003, 1.059968e-002, 1.244864e-002, 4.716378e-003,...
DESIRED: array([0.002589, 0.001292, 0.001888, 0.001056, 0.003151, 0.00081 ,
0.001982, 0.000918, 0.001428, 0.001255, 0.002878, 0.002438,
0.001504, 0.000821, 0.001053, 0.001965, 0.00179 , 0.002783,
0.001068, 0.000866])
FAILED pyrecest/tests/distributions/test_se2_partially_wrapped_normal_distribution.py::SE2PWNDistributionTest::test_pdf_large_uncertainty - AssertionError:
Not equal to tolerance rtol=1e-05, atol=0

Mismatched elements: 1 / 1 (100%)
Max absolute difference among violations: 4.67224177e-06
Max relative difference among violations: 0.01931544
ACTUAL: array([0.000247])
DESIRED: array(0.000242)
== 3 failed, 515 passed, 74 warnings, 37 subtests

…2 PWN distribution

Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/55139bb8-3a78-4953-a74f-2dc0f6369cd9

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

Copilot AI commented Apr 18, 2026

@copilot increase tolerance

FAILED pyrecest/tests/distributions/test_se2_partially_wrapped_normal_distribution.py::SE2PWNDistributionTest::test_integral - ValueError: not enough values to unpack (...

Fixed in commit b86c4cf. Three issues were resolved:

  1. test_pdf bug: The pdf() method had a reshape bug when processing batches — evals.reshape(-1, n_offsets).sum(axis=1) was incorrectly grouping evaluations across different samples instead of different offsets for the same sample. Fixed to evals.reshape(n_offsets, -1).sum(axis=0).

  2. test_integral error: get_reasonable_integration_boundaries() was returning a stacked 2D numpy array with uninitialized periodic bounds, instead of a proper list of [lower, upper] pairs for nquad. Fixed to return [[0, 2π], ...] for periodic dims and [mean±scale*sigma] for linear dims. Also fixed integrate_numerically() to use .item() (numpy 2.x compatible) when extracting the scalar from the pdf result.

  3. test_pdf_large_uncertainty tolerance: Increased rtol from 1e-5 to 0.05 to accommodate the ~3% difference that arises when theta crosses the 2π boundary (the class wraps theta to [0, 2π) before adding offsets while the reference does not, resulting in slightly different term coverage).

@FlorianPfaff FlorianPfaff force-pushed the main branch 2 times, most recently from a4109db to 4dbfd43 Compare April 21, 2026 11:57
@FlorianPfaff FlorianPfaff force-pushed the main branch 2 times, most recently from 7b21428 to 429a157 Compare April 21, 2026 13:50
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