I need a memory efficient way to zero pad uneven array size per event according to largest array in a tree. Is there any way available to do that in uproot?
Asked
Active
Viewed 76 times
1 Answers
0
jagged_array.pad(max_length).fillna(0)
If you need to find the maximum, you can
jagged_array.counts.max()
If you then need to turn it into pure NumPy, use regular()
.

Jim Pivarski
- 5,568
- 2
- 35
- 47