pwtools.comb.unique2d

pwtools.comb.unique2d(arr, what='row')[source]

Reduce 2d array arr to a 2d array with unique rows (or cols).

Parameters:
  • arr (2d-like) –

  • what (str) – {‘row’, ‘col’}

Return type:

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]])