Skip to content

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

@bkamins

Description

@bkamins

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

Metadata

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