You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Somehow, behavior for key-based selections differs between ranges and vectors. Selecting with vectors fails when some of the keys are not found:
julia> ka = KeyedArray(rand(3), x=10:12)
julia> ka(x=12:13)
1-dimensional KeyedArray(NamedDimsArray(...)) with keys:
↓ x ∈ 1-element UnitRange{Int64}
And data, 1-element view(::Vector{Float64}, 3:3) with eltype Float64:
(12) 0.8790116535631433
julia> ka(x=[12, 13])
ERROR: ArgumentError: unable to check bounds for indices of type Nothing
The text was updated successfully, but these errors were encountered:
I think those should both be errors. But apparently little effort was made to check & handle them. This is an error but perhaps it should be a more helpful error:
julia> ka(x=13)
ERROR: ArgumentError: invalid index: nothing of type Nothing
Somehow, behavior for key-based selections differs between ranges and vectors. Selecting with vectors fails when some of the keys are not found:
The text was updated successfully, but these errors were encountered: