Premium problem94. Rows with Unequal Values

Hard Locked

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.

Input

[[1 1 1]
 [1 2 3]
 [4 4 4]
 [5 6 5]]

Output

[[1 2 3]
 [5 6 5]]

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)