nalimilan / FreqTables.jl

Frequency tables in Julia
Other
89 stars 19 forks source link

Not working with Julia 0.6.3? #26

Closed nickeubank closed 6 years ago

nickeubank commented 6 years ago

Don't know anything about NamedArrays, so not sure about source of problem, but...


julia> c = [100, 200, 200, missing]
4-element Array{Union{Int64, Missings.Missing},1}:
 100
 200
 200
    missing

julia> freqtable(c)
ERROR: BoundsError: attempt to access 3-element Array{Int64,1} at index [200]
Stacktrace:
 [1] setindex!(::NamedArrays.NamedArray{Int64,1,Array{Int64,1},Tuple{DataStructures.OrderedDict{Union{Int64, Missings.Missing},Int64}}}, ::Int64, ::Int64) at /Users/Nick/.julia/v0.6/NamedArrays/src/index.jl:135
 [2] _freqtable(::Tuple{Array{Union{Int64, Missings.Missing},1}}, ::Bool, ::FreqTables.UnitWeights, ::Void) at /Users/Nick/.julia/v0.6/FreqTables/src/freqtable.jl:79
 [3] freqtable(::Array{Union{Int64, Missings.Missing},1}) at /Users/Nick/.julia/v0.6/FreqTables/src/freqtable.jl:88
 [4] macro expansion at /Users/Nick/.julia/v0.6/Atom/src/repl.jl:118 [inlined]
 [5] anonymous at ./<missing>:?
nalimilan commented 6 years ago

Dup of https://github.com/nalimilan/FreqTables.jl/issues/22. Hopefully should be fixed thanks to changed in NamedArrays.