Problem array

In reply to peter:

You have two problems. The array reduction methods like sum() all work on one dimension of an array. You need to sum() the sum() of each dimension.

The other problem is the result of a relational operator is a single bit, true or false. You need to cast the result to a larger width.

m.sum(d1) with (d1.sum(d2) with (int'(d2>4))
1 Like