Given a matrix Z, extract the rows that do not have all-equal values (e.g. keep [2, 2, 3], drop [5, 5, 5]). Return the filtered rows.
Z
[2, 2, 3]
[5, 5, 5]
solve(...)