I try to convert a part of an julia df from Int64 to Int8.
input:
array = convert(Array{Int8} , array );
output:
InexactError: trunc(Int8, -9223372036854775808)
Stacktrace:
[1] throw_inexacterror(f::Symbol, #unused#::Type{Int8}, val::Int64)
@ Core ./boot.jl:612
[2] checked_trunc_sint
@ ./boot.jl:634 [inlined]
[3] toInt8
@ ./boot.jl:649 [inlined]
[4] Int8
@ ./boot.jl:759 [inlined]
[5] convert
@ ./number.jl:7 [inlined]
[6] setindex!
@ ./array.jl:903 [inlined]
[7] _unsafe_copyto!(dest::Vector{Int8}, doffs::Int64, src::Vector{Int64}, soffs::Int64, n::Int64)
@ Base ./array.jl:253
[8] unsafe_copyto!
@ ./array.jl:307 [inlined]
[9] _copyto_impl!
@ ./array.jl:331 [inlined]
[10] copyto!
@ ./array.jl:317 [inlined]
[11] copyto!
@ ./array.jl:343 [inlined]
[12] copyto_axcheck!
@ ./abstractarray.jl:1104 [inlined]
[13] Vector{Int8}(x::Vector{Int64})
@ Base ./array.jl:563
[14] Array
@ ./boot.jl:482 [inlined]
[15] convert(#unused#::Type{Array{Int8}}, a::Vector{Int64})
@ Base ./array.jl:554
[16] top-level scope
@ In[62]:1
[17] eval
@ ./boot.jl:373 [inlined]
[18] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1196
Also: Input:
maximum(array)
output:
11
So the bigges value of this is under 255 which is the max size of Int8.
thanks,
Bene