gustaf.utils.arr.unique_rows#
- gustaf.utils.arr.unique_rows(in_arr, return_index=True, return_inverse=True, return_counts=True, dtype_name=None)[source]#
Find unique rows using np.unique, but apply tricks. Adapted from skimage.util.unique_rows. url: github.com/scikit-image/scikit-image/blob/main/skimage/util/unique.py/ Suitable for int types.
- Parameters:
in_arr ((n, m) 2D array-like)
return_index (bool)
return_inverse (bool)
return_counts (bool)
dtype_name (str)
- Returns:
unique_arr ((p, q) np.ndarray)
unique_ind ((w,) np.ndarray)
unique_inv ((t,) np.ndarray)