Skip to content

WIP: Adopt the array api #885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9b1be4c
Initial attempt to adopt array API
mwcraig Feb 7, 2025
4ee3449
A couple more changes
mwcraig Feb 9, 2025
978d102
Add function for check if something is an array
mwcraig Feb 10, 2025
99c4343
Remove numpy from core
mwcraig Feb 12, 2025
dce098d
WIP rewrite of a boolean index
mwcraig Mar 4, 2025
63d90f0
WIP testing updates
mwcraig Mar 4, 2025
1e1101f
Change more almost_equal to allclose
mwcraig Mar 5, 2025
ba53cbf
Use the random number generator from numpy
mwcraig Mar 5, 2025
7c86586
Remove more in-place array operations
mwcraig Mar 5, 2025
c36830c
Set a reasonable tolerance value in float comparisons
mwcraig Mar 5, 2025
e27a120
Continue to use numpy arrays in a few places
mwcraig Mar 6, 2025
01f5e36
Refactor warning handling for numerical warnings
mwcraig Mar 6, 2025
a911a0a
Avoid explicit use of numpy masked arrays
mwcraig Mar 6, 2025
57709e2
Rewrite test to not modify array in-place
mwcraig Mar 6, 2025
85dcf1a
Use assert_allclose instead of older alternatives
mwcraig Mar 7, 2025
4a031f2
Initial attempt to adopt array API in combiner
mwcraig Mar 7, 2025
1482c14
Write a mask-aware sum function that is array API compatible
mwcraig Mar 17, 2025
5bc8173
Eliminate most use of numpy in tests
mwcraig Mar 19, 2025
a1eeb50
Fix a couple calls to numpy masked array
mwcraig Mar 19, 2025
48899cd
One more workaround for immutable arrays
mwcraig Mar 19, 2025
12422b6
Fix up dependencies and test environment setup
mwcraig Mar 19, 2025
a0f3a8a
Update minimum python to 3.10
mwcraig Mar 19, 2025
6425b96
Fix mask access
mwcraig Mar 20, 2025
64894c3
Ignore warnings about negative values in square root
mwcraig Mar 20, 2025
ab80450
Update several minimum dependencies
mwcraig Mar 20, 2025
48cca23
Fix linting errors
mwcraig Mar 20, 2025
d776c1a
Drop unnecessary import
mwcraig Mar 20, 2025
3daabc0
Drop unneeded test
mwcraig Mar 20, 2025
5b947ea
Skip memory tests if jax is installed
mwcraig Mar 20, 2025
3e87408
Explain why numpy is still used in image_collection
mwcraig Mar 21, 2025
7386936
Drop numpy import in combiner
mwcraig Mar 24, 2025
98df4b7
Use array_api_extra to handle immutable arrays
mwcraig Mar 27, 2025
fc1c11f
Use a consistent namespace for arrays
mwcraig Mar 27, 2025
76082d5
Clean up a couple more cases to use array_api_extra
mwcraig Mar 27, 2025
6b96410
Change where bottleneck is test on GitHub Actions
mwcraig Mar 27, 2025
ed066ba
Skip coverage of one function
mwcraig Mar 27, 2025
6acc0df
Remove unused argument and logic
mwcraig Mar 27, 2025
04293b7
Add a test
mwcraig Mar 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 10 additions & 18 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,27 @@ jobs:
strategy:
matrix:
include:
- name: 'ubuntu-py38-oldestdeps'
- name: 'ubuntu-py311-oldestdeps'
os: ubuntu-latest
python: '3.8'
python: '3.11'
# Test the oldest supported dependencies on the oldest supported Python
tox_env: 'py38-test-oldestdeps'

- name: 'macos-py310-astroscrappy11'
# Keep this test until astroscrappy 1.1.0 is the oldest supported
# version.
os: macos-latest
python: '3.10'
tox_env: 'py310-test-astroscrappy11'
tox_env: 'py311-test-oldestdeps'

- name: 'ubuntu-py312-bottleneck'
# Do not include bottleneck in this coverage test. By not including
# it we get a better measure of how we are covered when using the
# array API, which bottleneck short-circuits.
- name: 'ubuntu-py312-coverage'
os: ubuntu-latest
python: '3.12'
tox_env: 'py312-test-alldeps-bottleneck-cov'

- name: 'ubuntu-py310'
os: ubuntu-latest
python: '3.10'
tox_env: 'py310-test-alldeps-numpy124'
tox_env: 'py312-test-alldeps-cov'

- name: 'ubuntu-py311'
os: ubuntu-latest
python: '3.11'
tox_env: 'py311-test-alldeps-numpy124'

- name: 'ubuntu-py312'
# Move bottleneck test a test without coverage
- name: 'ubuntu-py312-bottleneck'
os: ubuntu-latest
python: '3.12'
tox_env: 'py312-test-alldeps-numpy126'
Expand Down
Loading