Question on Array.Sum() Method , generate a n*n matrix such that there is only one 1's in a coloumn

In reply to Jianfeng_0:

Agree, But on EDA playground both(The col wise iteration u mentioned and the one I wrote ) produced same result with Mentor Questa and both gave 0’s with synopsys VCS.