Skip to content
New issue

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

Indexes can't be Int128 #271

Open
HBreddam opened this issue Jan 22, 2020 · 0 comments
Open

Indexes can't be Int128 #271

HBreddam opened this issue Jan 22, 2020 · 0 comments

Comments

@HBreddam
Copy link

The code below gives a Method error, but works if I remove the Int128 from the key array.

vals = [i for i in 1:10]

keys = [Int128(i) for i in 1:10]

testsparse = ndsparse((a=keys,),(c=vals,))

julia> testsparse[1]

ERROR: MethodError: no method matching get(::IndexedTables.var"#146#147"{Tuple{Int64}}, ::NDSparse{NamedTuple{(:c,),Tuple{Int64}},Tuple{Int128},StructArrays.StructArray{NamedTuple{(:a,),Tuple{Int128}},1,NamedTuple{(:a,),Tuple{Array{Int128,1}}},Int64},StructArrays.StructArray{NamedTuple{(:c,),Tuple{Int64}},1,NamedTuple{(:c,),Tuple{Array{Int64,1}}},Int64}}, ::Tuple{Int64})
Closest candidates are:
  get(::REPL.Terminals.TTYTerminal, ::Any, ::Any) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\REPL\src\Terminals.jl:176
  get(::IdDict{K,V}, ::Any, ::Any) where {K, V} at abstractdict.jl:596
  get(::Union{Function, Type}, ::IdDict{K,V}, ::Any) where {K, V} at abstractdict.jl:651
  ...
Stacktrace:
 [1] _getindex_scalar(::NDSparse{NamedTuple{(:c,),Tuple{Int64}},Tuple{Int128},StructArrays.StructArray{NamedTuple{(:a,),Tuple{Int128}},1,NamedTuple{(:a,),Tuple{Array{Int128,1}}},Int64},StructArrays.StructArray{NamedTuple{(:c,),Tuple{Int64}},1,NamedTuple{(:c,),Tuple{Array{Int64,1}}},Int64}}, ::Tuple{Int64}) at C:\Users\hebb\.julia\packages\IndexedTables\5U0Ap\src\indexing.jl:21
 [2] _getindex(::NDSparse{NamedTuple{(:c,),Tuple{Int64}},Tuple{Int128},StructArrays.StructArray{NamedTuple{(:a,),Tuple{Int128}},1,NamedTuple{(:a,),Tuple{Array{Int128,1}}},Int64},StructArrays.StructArray{NamedTuple{(:c,),Tuple{Int64}},1,NamedTuple{(:c,),Tuple{Array{Int64,1}}},Int64}}, ::Tuple{Int64}) at C:\Users\hebb\.julia\packages\IndexedTables\5U0Ap\src\indexing.jl:18
 [3] getindex(::NDSparse{NamedTuple{(:c,),Tuple{Int64}},Tuple{Int128},StructArrays.StructArray{NamedTuple{(:a,),Tuple{Int128}},1,NamedTuple{(:a,),Tuple{Array{Int128,1}}},Int64},StructArrays.StructArray{NamedTuple{(:c,),Tuple{Int64}},1,NamedTuple{(:c,),Tuple{Array{Int64,1}}},Int64}}, ::Int64) at C:\Users\hebb\.julia\packages\IndexedTables\5U0Ap\src\indexing.jl:15
 [4] top-level scope at none:0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant