Skip to content

fix: raise on image views#239

Draft
beckermr wants to merge 5 commits into
mainfrom
no-views
Draft

fix: raise on image views#239
beckermr wants to merge 5 commits into
mainfrom
no-views

Conversation

@beckermr
Copy link
Copy Markdown
Collaborator

@beckermr beckermr commented May 12, 2026

JAX does not allow true array views, so we should not allow folks to use the Image.view method. Instead, I have extended the syntax of the Image.copy method to allow things about the image to be changed while making a copy.

TODO:

  • For tests that use views, but are not testing view, implement a jax-specific test or modify GalSim test suite so they run.
    • tests/GalSim/tests/test_image.py::test_complex_image
    • tests/GalSim/tests/test_image.py::test_undefined_image
    • tests/GalSim/tests/test_image.py::test_Image_basic
    • tests/GalSim/tests/test_hsm.py::test_moments_basic
    • tests/GalSim/tests/test_image.py::test_Image_view

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 12, 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 no-views (630bf73) with main (7b6aecc)

Open in CodSpeed

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