Skip to content

Using a PartitionedArray, accessing its properties #807

Answered by jpivarski
drahnreb asked this question in Q&A
Discussion options

You must be logged in to vote

Both of these are problems with mixing high-level and low-level arrays.

In the first example, array is a high-level array whose layout is partitioned. The fact that array is partitioned is not visible from the array level; you'd only know it if you delved into the layout (or used ak.partitions to get the length of each). To access the actual partitions, you could do array.layout.partitions, but this would be a low-level view.

In the second example, you created a low-level IrregularlyPartitionedArray, which has no layout because it is a layout. If wrapped in an ak.Array constructor, it would behave like an unpartitioned high-level array.

You might be trying to iterate over partitions. Ther…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@drahnreb
Comment options

Answer selected by drahnreb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #806 on April 07, 2021 20:38.