WISH: Remove duplicates from a list component

Suprisingly it’s not there :slight_smile:

All duplicates, or leave one? Do you need tolerance inputs as well?

Leave one

What does “tolerance inputs” means?

Well, if your list contains data which has floating point values, then you’ll need a tolerance threshold for equality comparisons. It’s easy enough testing whether two integers are the same, but if you have a list of floating point values which looks like [0.0, 0.0000000000001, -0.000000000002, 0.99999999999998, 1.0, 1.00000000000003] you probably want to end up with just [0.0, 1.0] right? But where’s the cutoff? Is 1.0000001 still the same as 1.0? What about 1.00001?

The Create Set component will remove all duplicates from a list, but it only works for simple data types. And it doesn’t have tolerance inputs, so you may need to round your values first.

Yes I did exactly this, I rounded my list before putting it in CreateSet
But it’s a bit error prone.

Perhaps the answer to if I need a tolerance input is YES then.