repartition(array, lengths, highlevel=True, behavior=None)¶
array – A possibly-partitioned array.
lengths (None, int, or iterable of int) – If None, concatenate the pieces of a partitioned array into a non-partitioned array. If an integer, split or repartition into partitions of the given number of entries (except the last, if the length of the array doesn’t fit an integer number of equal-sized chunks). If an iterable of integers, split or repartition into the given sequence of lengths.
behavior (None or dict) – Custom
ak.behaviorfor the output array, if high-level.
Returns a possibly-partitioned array: unpartitioned if
lengths is None;
Partitioning is an internal aspect of an array: it should behave identically to a non-partitioned array, but possibly with different performance characteristics.
Arrays can only be partitioned in the first dimension; it is intended for performing calculations in memory-sized chunks.