pwtools
Reduce 2d array arr to a 2d array with unique rows (or cols).
arr (2d-like)
what (str) – {‘row’, ‘col’}
numpy 2d array
Examples
>>> a=array([[1,2,3], [1,2,3], [1,2,4]]) >>> unique2d(a, 'row') array([[1, 2, 3], [1, 2, 4]])