Skip to content

Fix JAX outer NumPy contract#3434

Merged
FlorianPfaff merged 2 commits into
mainfrom
fix-jax-outer-numpy-contract-20260629
Jun 29, 2026
Merged

Fix JAX outer NumPy contract#3434
FlorianPfaff merged 2 commits into
mainfrom
fix-jax-outer-numpy-contract-20260629

Conversation

@FlorianPfaff

Copy link
Copy Markdown
Owner

Summary

  • Patch the JAX backend outer helper from pyrecest.backend_support so it flattens both inputs before forming the outer product, matching NumPy semantics.
  • Keep both the active public JAX facade and the raw pyrecest._backend.jax.outer helper on the same contract.
  • Add subprocess regression coverage for multidimensional JAX inputs.

Bug fixed

The current JAX backend outer implementation treats multidimensional inputs as batched outer products. NumPy's outer contract flattens both inputs first, so shapes such as (2, 2) and (2, 1) should produce (4, 2), not a batched shape.

Testing

  • Not run locally in this connector session; the container cannot resolve github.com.
  • Added tests/backend_support/test_jax_outer_contract.py for focused CI coverage.

@FlorianPfaff FlorianPfaff enabled auto-merge (squash) June 29, 2026 14:24
@github-actions

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 64.85s
✅ JSON prettier 7 0 0 0 0.95s
✅ JSON v8r 7 0 0 4.38s
✅ MARKDOWN markdownlint 68 0 0 0 2.0s
✅ MARKDOWN markdown-table-formatter 68 0 0 0 1.03s
✅ PYTHON black 1126 10 0 0 53.83s
✅ PYTHON isort 1126 15 0 0 3.39s
✅ REPOSITORY checkov yes no no 42.66s
✅ REPOSITORY gitleaks yes no no 10.89s
✅ REPOSITORY git_diff yes no no 0.15s
✅ REPOSITORY secretlint yes no no 40.87s
✅ REPOSITORY syft yes no no 3.26s
✅ REPOSITORY trivy-sbom yes no no 5.56s
✅ REPOSITORY trufflehog yes no no 16.48s
✅ YAML prettier 11 0 0 0 0.74s
✅ YAML v8r 11 0 0 11.12s
✅ YAML yamllint 11 0 0 0.48s

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_BLACK,PYTHON_ISORT,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 force-pushed the fix-jax-outer-numpy-contract-20260629 branch from d98b883 to 38fbdad Compare June 29, 2026 15:34
@FlorianPfaff FlorianPfaff force-pushed the fix-jax-outer-numpy-contract-20260629 branch from 38fbdad to 1341dc5 Compare June 29, 2026 15:34
@FlorianPfaff FlorianPfaff merged commit 5562288 into main Jun 29, 2026
7 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