data = np.random.randint(10, size=(5, 10))
[len(set(i)) for i in data.reshape(data.shape[0], -1)]
sdata = np.sort(data, axis=1)
(np.diff(sdata) > 0).sum(axis=1) + 1
vectorize numpy unique for subarrays