Skip to content

Should InvertedIndices call to_indices on all elements in an array of skipped indices? #31

Open
@bkamins

Description

We have the following super bad behavior:

julia> [1, 2, 3, 4][Not(Not([1.5]))]
1-element Vector{Int64}:
 2

julia> [1, 2, 3, 4][Not(Not([1.5]))]
1-element Vector{Int64}:
 0

julia> [1, 2, 3, 4][Not(Not([1.5]))]
1-element Vector{Int64}:
 4294967297

which is a consequence of the fact that:

to_index(I::AbstractArray) = I

in Base.

@mbauman - do you think we should fix it in InvertedIndices.jl or this should be fixed in Base?

CC @nalimilan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions