Using sum() to Calculate the Sum of a 2D Array

In reply to amy992:

The assignment to y needs to go inside the initial begin/end block. There is nothing wrong with the use of the sum() method.