Skip to content

[codex] add gaussian multiplication example#1887

Merged
FlorianPfaff merged 1 commit intomainfrom
codex/gaussian-multiplication-example
Apr 27, 2026
Merged

[codex] add gaussian multiplication example#1887
FlorianPfaff merged 1 commit intomainfrom
codex/gaussian-multiplication-example

Conversation

@FlorianPfaff
Copy link
Copy Markdown
Owner

Summary

  • Added examples/basic/gaussian_multiplication.py to demonstrate multiplying Gaussian distributions and checking the result against the closed-form information representation.
  • Fixed GaussianDistribution.multiply() to compute the Gaussian product in information form instead of using backend dot() for matrix products.
  • Added a regression test for multiplying multiple Gaussian factors.

Validation

  • PYTHONPATH=src python examples/basic/gaussian_multiplication.py
  • PYTHONPATH=src python -m pytest tests/distributions/test_gaussian_distribution.py
  • PYTHONPATH=src PYRECEST_BACKEND=pytorch python examples/basic/gaussian_multiplication.py
  • PYTHONPATH=src PYRECEST_BACKEND=pytorch python -m pytest tests/distributions/test_gaussian_distribution.py
  • PYTHONPATH=src PYRECEST_BACKEND=jax python examples/basic/gaussian_multiplication.py
  • PYTHONPATH=src PYRECEST_BACKEND=jax python -m pytest tests/distributions/test_gaussian_distribution.py

@github-actions
Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 13.66s
✅ JSON prettier 2 0 0 0 0.46s
✅ JSON v8r 2 0 0 2.51s
✅ MARKDOWN markdownlint 2 0 0 0 0.74s
✅ MARKDOWN markdown-table-formatter 2 0 0 0 0.25s
✅ PYTHON bandit 415 0 0 6.37s
✅ PYTHON black 415 2 0 0 9.62s
✅ PYTHON flake8 415 0 0 3.56s
✅ PYTHON isort 415 2 0 0 0.78s
✅ PYTHON mypy 415 0 0 5.47s
✅ PYTHON pylint 415 0 0 123.99s
✅ PYTHON ruff 415 2 0 0 0.07s
✅ REPOSITORY checkov yes no no 20.67s
✅ REPOSITORY gitleaks yes no no 9.72s
✅ REPOSITORY git_diff yes no no 0.06s
✅ REPOSITORY secretlint yes no no 7.82s
✅ REPOSITORY syft yes no no 2.78s
✅ REPOSITORY trivy-sbom yes no no 3.66s
✅ REPOSITORY trufflehog yes no no 19.23s
✅ YAML prettier 4 0 0 0 0.48s
✅ YAML v8r 4 0 0 5.32s
✅ YAML yamllint 4 0 0 0.36s

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 marked this pull request as ready for review April 27, 2026 09:59
@github-actions
Copy link
Copy Markdown
Contributor

Test Results

    12 files  ± 0      12 suites  ±0   4h 26m 48s ⏱️ - 14m 35s
 1 172 tests + 1   1 172 ✅ + 1      0 💤 ±0  0 ❌ ±0 
14 356 runs  +12  10 840 ✅ +12  3 516 💤 ±0  0 ❌ ±0 

Results for commit 317ea32. ± Comparison against base commit 1c808e2.

@FlorianPfaff FlorianPfaff merged commit 8b135ed into main Apr 27, 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