"UVM way' to print a 2-dimensional array of int

In reply to adrianf0:

Overwriting do_print allows you to print these data in any format, as 1 long row or 1 column or, or …
And in the UVM never and naver use $display. The UVM provides you with a powerful reporting mechanism. You should use this and not the simple $display.
To get the format you want to print you need 2 nested loops, 1 for the rows and 1 for the columns:

for (int i = 0; i < max_i; i++)
for (int j = 0; j < max_i; j++)
$sformatf(“some string %0d[%0d][%0d]”, x[i][j]);