We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! I found this error trying to index a bidimensional named array with a bidimensional bit array.
julia> mat = NamedArray(rand(1:10,2,3)) 2×3 Named Array{Int64,2} A ╲ B │ 1 2 3 ──────┼─────────── 1 │ 3 3 9 2 │ 10 1 4 julia> mask = mat .== 3 2×3 BitArray{2}: true true false false false false julia> mat[mask] ERROR: MethodError: no method matching NamedArrays.NamedArray{T,N,AT,DT}(::Array{Int64,1}, ::Tuple{Array{String,1},Array{String,1}}, ::Tuple{Symbol,Symbol}) Closest candidates are: NamedArrays.NamedArray{T,N,AT,DT}{T,N}(::AbstractArray{T,N}, ::Tuple{}, ::Tuple{Vararg{T,N}}) at /home/diego/.julia/v0.5/NamedArrays/src/constructors.jl:18 NamedArrays.NamedArray{T,N,AT,DT}{T,N}(::AbstractArray{T,N}, ::Tuple{}) at /home/diego/.julia/v0.5/NamedArrays/src/constructors.jl:19 NamedArrays.NamedArray{T,N,AT,DT}{T,N}(::AbstractArray{T,N}, ::Tuple{Vararg{DataStructures.OrderedDict,N}}) at /home/diego/.julia/v0.5/NamedArrays/src/constructors.jl:30 ... in namedgetindex(::NamedArrays.NamedArray{Int64,2,Array{Int64,2},Tuple{DataStructures.OrderedDict{String,Int64},DataStructures.OrderedDict{String,Int64}}}, ::BitArray{2}) at /home/diego/.julia/v0.5/NamedArrays/src/index.jl:116 in getindex(::NamedArrays.NamedArray{Int64,2,Array{Int64,2},Tuple{DataStructures.OrderedDict{String,Int64},DataStructures.OrderedDict{String,Int64}}}, ::BitArray{2}) at /home/diego/.julia/v0.5/NamedArrays/src/index.jl:11 julia> array(mat)[mask] 2-element Array{Int64,1}: 3 3
Best!
The text was updated successfully, but these errors were encountered:
For julia-0.5, this seems to be fixed with b6a3b1d for free. Could you check, please?
Sorry, something went wrong.
In fact, @timholy seems to have solved this for me in his clever PR #29, which has been merged now.
I suppose this can be closed now.
No branches or pull requests
Hi!
I found this error trying to index a bidimensional named array with a bidimensional bit array.
Best!
The text was updated successfully, but these errors were encountered: