Skip to content

Fix JAX assignment indexing#2182

Merged
FlorianPfaff merged 3 commits into
mainfrom
codex/fix-jax-assignment-indexing-20260523
May 23, 2026
Merged

Fix JAX assignment indexing#2182
FlorianPfaff merged 3 commits into
mainfrom
codex/fix-jax-assignment-indexing-20260523

Conversation

@FlorianPfaff
Copy link
Copy Markdown
Owner

Summary

  • normalize JAX backend assignment indices before applying .at[...], so list indices, boolean masks, and list-of-coordinate advanced indices work consistently with the intended NumPy-style backend contract
  • preserve vectorized shorter-index assignment semantics and value-count validation
  • add JAX subprocess regression coverage for assignment and assignment_by_sum

Validation

  • reproduced the raw JAX failure locally for list/list-of-tuple indices via jax.numpy (TypeError: Using a non-tuple sequence for multidimensional indexing is not allowed)
  • locally exercised the normalization behavior for list scalar indices, coordinate tuples, boolean masks, and assignment_by_sum
  • connector diff check: changes are limited to src/pyrecest/_backend/jax/__init__.py and tests/backend_support/test_jax_assignment_contract.py

Note: I could not run the repository pytest suite locally because this sandbox cannot resolve github.com for checkout; PR CI should run the suite.

@github-actions
Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 36.78s
✅ PYTHON black 2 1 0 0 2.58s
✅ PYTHON isort 2 2 0 0 0.6s
✅ REPOSITORY checkov yes no no 32.44s
✅ REPOSITORY gitleaks yes no no 17.33s
✅ REPOSITORY git_diff yes no no 0.07s
✅ REPOSITORY secretlint yes no no 13.24s
✅ REPOSITORY syft yes no no 2.73s
✅ REPOSITORY trivy-sbom yes no no 4.31s
✅ REPOSITORY trufflehog yes no no 23.47s

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
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

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

@FlorianPfaff FlorianPfaff enabled auto-merge (squash) May 23, 2026 09:03
@FlorianPfaff FlorianPfaff merged commit 7026785 into main May 23, 2026
26 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