feat: skip materialization of placeholders in to_packed#3637
feat: skip materialization of placeholders in to_packed#3637ikrommyd merged 5 commits intoscikit-hep:mainfrom
to_packed#3637Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files
🚀 New features to boost your workflow:
|
|
The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR3637 |
ianna
left a comment
There was a problem hiding this comment.
@ikrommyd - Great! Thanks for implementing it. I would have had a slight preference to "skip materializing placeholders" as a more concise title to this PR. As discussed - this should go into the release. Please merge if you have finished with it. Thanks!
to_packedto_packed
|
Thanks @ianna! Changed the title accordingly. |
pfackeldey
left a comment
There was a problem hiding this comment.
I just have a typing suggestion to be more explicit here. Apart from that it looks great and ready to be merged!
(I forgot if we planned to add tests here, or not?)
Well the problem arises in |
yes, makes sense! |
|
@pfackeldey added the typing improvement and a test! |
pfackeldey
left a comment
There was a problem hiding this comment.
Awesome! Thanks, please merge once the CI passes 👍
|
Damn it windows 3.9 numpy dtypes 🤣 Let me enforce some dtype |
This PRs avoids the materialization of placeholder arrays in
to_packedto not cause problems indask-awwkard.We do this by adding a
type_argument tomaterializeeverywhere and tomaybe_materialize.maybe_materializeandlayout.materialize()now materialize all instances oftype_and it defaults toMaterializableArray. For the special case ofto_packed, we change this option toVirtualNDArray.From the discussion in #3636, it was decided that this is the move for now.