pyyeti.locate.find_duplicates¶
- pyyeti.locate.find_duplicates(v, tol=0.0)[source]¶
Find duplicate values in a vector (or within a tolerance).
- Parameters:
v (1d array_like) – Vector to find duplicates in.
tol (scalar; optional) – Tolerance for checking for duplicates. Values are considered duplicates if the absolute value of the difference is <= tol.
- Returns:
dups (1d ndarray) – Bool partition vector for repeated values. dups will have True for any value that is repeated anywhere else in the vector. It will be all False if there are no repeated values.
Examples
>>> from pyyeti import locate >>> locate.find_duplicates([0, 10, 2, 2, 6, 10, 10]) array([False, True, True, True, False, True, True], dtype=bool)