When I tried the following command to generate 2-dims linspace arrays, whose type should be Float
, not Int
r = range([1,1],[8,9],length=10)
# 10-element LinRange{Array{Int64,1}}:
# [1.0, 1.0],[1.77778, 1.88889],[2.55556, 2.77778],…,[7.22222, 8.11111],[8.0, 9.0]
and when I access r[2]
, it throws
ERROR: InexactError: Int64(1.7777777777777777)
But the LinRange
works well,
lr = LinRange([1,1],[8,9],10)
# 10-element LinRange{Array{Float64,1}}:
# [1.0, 1.0],[1.77778, 1.88889],[2.55556, 2.77778],…,[7.22222, 8.11111],[8.0, 9.0]
So I am wondering if this is a possible bug returned by range
in 2-dims case.