Open eliascarv opened 11 months ago
A possible solution would be to restrict these methods to just AbstractArrays and Tuples:
That would be breaking, because it would kill findall
for other iterables.
Maybe we should change it to
bset = AbstractSet(b)
defaulting to Set(b)
. That way, if b
is already a subtype of AbstractSet
(or if you define an AbstractSet
constructor for your geometry type), you'll get bset === b
.
In Meshes.jl, we use
in
function to check if a point (element) is in geometry (set), e.g.point in geometry
. But the methodfindall(in(geometry), vector_of_points)
treatsgeometry
as a finite iterable.MWE:
This error occurs due to the following method definitions:
link: https://github.com/JuliaLang/julia/blob/master/base/array.jl#L2783-L2784
link: https://github.com/JuliaLang/julia/blob/master/base/array.jl#L2720-L2727
A possible solution would be to restrict these methods to just
AbstractArray
s andTuple
s: