Removes duplicates from an array of numbers.
rhinoscriptsyntax.CullDuplicateNumbers (numbers, tolerance=None)
numbers |
Required. List or tuple. |
tolerance |
Optional. Number. The minimum distance between numbers. Numbers that fall within this tolerance will be discarded. If omitted, Rhino's internal zero tolerance is used. |
List |
A list of numbers with duplicates removed if successful. |
import rhinoscriptsyntax as rs
arr = [1,1,2,2,3,3,4,4,5,5]
arr = rs.CullDuplicateNumbers(arr)
for n in arr: print n