Array Method .sum() for multiple dimension array

In reply to javatea:

The first should not have worked, unless the dimension sizes of the array were 0, then the resulting sum would be 0.

SystemVerilog has arrays of arrays where each array is a single unpacked dimension. To get the result you want, use

box.sum() with (item.sum());