Skip to content

findall(::Fix2{typeof(in)}, array) and _findin make assumptions on finiteness #29124

Open
@andyferris

Description

@andyferris

When creating the predicate pred = in(something), it may be that something is not a finite, iterable collection, but that in(x, something) is still a fast operation. (In my case it's 3D points in a Sphere - fast to determine, but Sphere is an uncountable set).

In this case, the implementation of _findin(a, b) is not valid, because we assume b can be converted to a Set here.

This function is called by findall here, without consideration whether something (i.e. pred.x) is finite.

I would recommend changing this signature to the case where pred.x isa Union{AbstractArray, Tuple} for consistency, but I'm not sure if that will cause regressions for anyone?

Metadata

Metadata

Assignees

No one assigned

    Labels

    search & findThe find* family of functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions