Skip to content
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

refactor: use nplike.asarray #2134

Merged
merged 12 commits into from
Jan 18, 2023
Merged

refactor: use nplike.asarray #2134

merged 12 commits into from
Jan 18, 2023

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Jan 17, 2023

The work to move to an array-API inspired UX requires that we drop array and asarray distinctions; now asarray takes a copy parameter, and drops the order parameter.

I'm gradually dropping nplike usage in our tests, where appropriate; we should probably focus on testing L1 and L2, not L3.

@agoose77 agoose77 temporarily deployed to docs-preview January 17, 2023 18:40 — with GitHub Actions Inactive
@agoose77 agoose77 temporarily deployed to docs-preview January 17, 2023 19:04 — with GitHub Actions Inactive
@agoose77 agoose77 temporarily deployed to docs-preview January 18, 2023 13:24 — with GitHub Actions Inactive
@agoose77 agoose77 temporarily deployed to docs-preview January 18, 2023 16:05 — with GitHub Actions Inactive
@agoose77 agoose77 temporarily deployed to docs-preview January 18, 2023 16:33 — with GitHub Actions Inactive
@agoose77 agoose77 requested a review from jpivarski January 18, 2023 16:45
@agoose77 agoose77 temporarily deployed to docs-preview January 18, 2023 16:56 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Jan 18, 2023

Codecov Report

Merging #2134 (ab59f6e) into main (3a0d3c9) will increase coverage by 0.01%.
The diff coverage is 81.63%.

Additional details and impacted files
Impacted Files Coverage Δ
src/awkward/_connect/jax/reducers.py 82.14% <ø> (ø)
src/awkward/_connect/numba/layout.py 83.37% <ø> (-0.05%) ⬇️
src/awkward/_reducers.py 88.69% <0.00%> (ø)
src/awkward/contents/unionarray.py 84.98% <0.00%> (ø)
src/awkward/operations/ak_concatenate.py 96.03% <ø> (ø)
src/awkward/operations/ak_fill_none.py 95.00% <ø> (ø)
src/awkward/operations/ak_unflatten.py 95.45% <ø> (ø)
src/awkward/contents/indexedoptionarray.py 88.67% <50.00%> (ø)
src/awkward/operations/ak_flatten.py 92.30% <50.00%> (ø)
src/awkward/_nplikes.py 64.77% <62.50%> (-0.36%) ⬇️
... and 16 more

Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

Looks good! (For posterity: we talked about this in our weekly Zoom meeting. The functionality of asarray and array is being combined in Array-API, so we're following the same pattern in our nplikes for future-proofing.)

@agoose77 agoose77 merged commit b6e4c71 into main Jan 18, 2023
@agoose77 agoose77 deleted the agoose77/refactor-use-asarray branch January 18, 2023 18:31
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.

2 participants