Skip to content

feat: adopt a more JAX-like API#211

Draft
beckermr wants to merge 17 commits intomainfrom
jax-api-changes
Draft

feat: adopt a more JAX-like API#211
beckermr wants to merge 17 commits intomainfrom
jax-api-changes

Conversation

@beckermr
Copy link
Copy Markdown
Collaborator

@beckermr beckermr commented Mar 23, 2026

This PR

  • adopts a more JAX-like API for the Image classes
  • enables certain JAX-like operations for setting subimages of a fixed size
  • change the Bounds class to interoperate with JAX more cleanly
  • add test to ensure we raise on operations like img[b] += ...
  • ensure tests pass
  • write docs

closes #210

Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 23, 2026

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 36 untouched benchmarks


Comparing jax-api-changes (de77436) with main (1977814)

Open in CodSpeed

raise TypeError("image[..] requires either 1 or 2 args")
if self.isconst:
raise _galsim.GalSimImmutableError("Cannot modify an immutable Image", self)
raise RuntimeError(
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should raise a better error here.

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.

bounds, JIT, image views etc.

1 participant