-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
Hi!
broadcast with only one named matrix doesn't work because the assertion nargs > 1 in verify_names.
julia> mat = rand(1:20,4,4)
4×4 Array{Int64,2}:
7 2 11 9
1 1 12 19
18 6 10 18
7 2 19 13
julia> namedmat = NamedArray(mat)
4×4 Named Array{Int64,2}
A ╲ B │ 1 2 3 4
──────┼───────────────
1 │ 7 2 11 9
2 │ 1 1 12 19
3 │ 18 6 10 18
4 │ 7 2 19 13
julia> string.(mat)
4×4 Array{String,2}:
"7" "2" "11" "9"
"1" "1" "12" "19"
"18" "6" "10" "18"
"7" "2" "19" "13"
julia> string.(namedmat)
ERROR: AssertionError: nargs > 1
in verify_names(::NamedArrays.NamedArray{Int64,2,Array{Int64,2},Tuple{DataStructures.OrderedDict{String,Int64},DataStructures.OrderedDict{String,Int64}}}, ::Vararg{NamedArrays.NamedArray{Int64,2,Array{Int64,2},Tuple{DataStructures.OrderedDict{String,Int64},DataStructures.OrderedDict{String,Int64}}},N}) at /home/dzea/.julia/v0.5/NamedArrays/src/keepnames.jl:28
in broadcast(::Function, ::NamedArrays.NamedArray{Int64,2,Array{Int64,2},Tuple{DataStructures.OrderedDict{String,Int64},DataStructures.OrderedDict{String,Int64}}}) at /home/dzea/.julia/v0.5/NamedArrays/src/keepnames.jl:47
Best
Metadata
Metadata
Assignees
Labels
No labels