davidavdav / NamedArrays.jl

Julia type that implements a drop-in replacement of Array with named dimensions
Other
118 stars 20 forks source link

Indexing with Not(i::AbstractVector{Bool}) gives the incorrect result #102

Closed tomhaber closed 3 years ago

tomhaber commented 3 years ago

closes #101

davidavdav commented 3 years ago

Thanks for this effort—can you add a line for the BitArray case as well?

X[:, Not(BitArray([true, false, true, false, true]))]
tomhaber commented 3 years ago

That's actually already covered by the current line.

Thank you for the nice package

tomhaber commented 3 years ago

I have another related problem: I sometimes create NamedArrays with SubStrings, but then I'm not allowed to index the arrays with Strings because of

indices(dict::AbstractDict{K,V}, i::K) where {K, V<:Integer} = dict[i]

Can I maybe open this up to any index type? For example:

indices(dict::AbstractDict{K,V}, i) where {K, V<:Integer} = dict[i]