nifty8.re.num.unique module#

amend_unique(ar, el, *, axis=-1, atol=1e-10, rtol=1e-05) Tuple[ndarray[Any, dtype[_ScalarType_co]], int][source]#

Amend the element el if it is unique up to the specified tolerance otherwise do nothing.

amend_unique_(ar, el, *, axis=-1, atol=1e-10, rtol=1e-05)[source]#
unique(ar, *, return_inverse=False, axis=-1, atol=1e-10, rtol=1e-05, _verbosity=0)[source]#

Find unique sub-arrays in ar along axis within a given tolerance.

The algorithm is efficient if the number of approximately unique values is small compared to the overall size of ar along axis.