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

feat: support scalars in TypeTracer operations #1774

Merged
merged 8 commits into from
Oct 6, 2022

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Oct 6, 2022

Fixes #1703

This PR:

  • adds support for JAX arrays in ak.Array
  • adds support for TypeTracerArray in ak.to_layout
  • tightens isinstance to ak._util.is_sized_iterable in ak.fill_none
  • removes iterator support from TypeTracerArray.from_array and refactors its usage

@agoose77 agoose77 marked this pull request as ready for review October 6, 2022 15:50
@codecov
Copy link

codecov bot commented Oct 6, 2022

Codecov Report

Merging #1774 (9ffc432) into main (df377bd) will increase coverage by 0.01%.
The diff coverage is 72.72%.

Additional details and impacted files
Impacted Files Coverage Δ
src/awkward/contents/numpyarray.py 90.05% <ø> (ø)
src/awkward/operations/ak_fill_none.py 89.74% <ø> (-0.26%) ⬇️
src/awkward/operations/ak_to_layout.py 80.39% <62.50%> (+1.32%) ⬆️
src/awkward/highlevel.py 75.70% <75.00%> (-0.09%) ⬇️
src/awkward/_typetracer.py 74.90% <84.61%> (+0.37%) ⬆️
src/awkward/contents/indexedarray.py 79.76% <0.00%> (-0.19%) ⬇️
src/awkward/contents/recordarray.py 83.72% <0.00%> (-0.18%) ⬇️
src/awkward/_util.py 81.95% <0.00%> (-0.18%) ⬇️
src/awkward/_connect/avro.py 87.17% <0.00%> (-0.14%) ⬇️
src/awkward/types/_awkward_datashape_parser.py 47.72% <0.00%> (-0.01%) ⬇️
... and 2 more

@agoose77 agoose77 changed the title feat: widen scope of TypeTracer.asarray feat: support scalars in TypeTracer operations Oct 6, 2022
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.

The is_own_array thing is showing its usefulness and generality here.

Everything looks good to me!

@jpivarski jpivarski merged commit e9cb7b8 into main Oct 6, 2022
@jpivarski jpivarski deleted the agoose77/fix-fill-none branch October 6, 2022 19:07
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.

ak.fill_none fails with typetracer Array
2 participants