Handling duplicate points without throwing an error #215
Replies: 4 comments 5 replies
-
In general I prefer to make the user make the decision here. But maybe this would be nice. The identified duplicates could be passed to the existing kwarg skip_points (merged with the existing if needing). Do you want to make a pr that does that? |
Beta Was this translation helpful? Give feedback.
-
I generally agree with your philosophy @DanielVandH, however there is one use case where making the user deal with it is quite annoying. Specifically the Makie case, there have been many times where I wanted to visualize the data without care for duplicates. It would be super convenient to allow Makie to filter those points. With that said, Makie could in theory pipe all of the data through a unique function call, but that generally seems wasteful because most data won't have duplicates. If this library already has some logic for duplicate detection, maybe it can silently skip those points (put behind a flag). Then Makie can set that flag accordingly? |
Beta Was this translation helpful? Give feedback.
-
I think changing the default behaviour to skipping duplicates and displaying a warning to the user is sufficient. Making this a flag that Makie sets would be annoying I think since I don't think I want to make this a new keyword argument to DelaunayTriangulation.jl/src/setup.jl Line 42 in 9134c8e My suggestion in my last reply would be pretty simple to implement I think. would be changed to skip_points = has_unique_points(points, skip_points) and you make use of
to figure out what points to merge into the existing skip_points (skip_points can probably be converted into a Set so that mutation works regardless of what the user provides, be it a Tuple or a Vector ). Here
you would warn instead of throw .
|
Beta Was this translation helpful? Give feedback.
-
v1.6.4 will now have a fix for this @Kevin-Mattheus-Moerman @EdsterG . |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
@DanielVandH I have a question about duplicate point errors. Could DelaunayTriangulation handle the duplicate points (e.g. by removing the duplicates?) and issue a warning rather than an error?
Beta Was this translation helpful? Give feedback.
All reactions