-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcorrectness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwingBugs that are likely to lead to incorrect results in user code without throwing
Description
I installed Julia with the command curl -fsSL https://install.julialang.org | sh
. I couldn't find anyone else talking about this specific issue anywhere I looked, but I apologize if I just missed it. There seems to be a problem displaying reinterpret
ed/reshape
ed 0-dimensional arrays. Despite the fact that the elements of this array are Int64
s, they are shown as 0-dimensional arrays of Int64
s with unrelated contents. The setup is shown below.
julia> versioninfo()
Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 10 × Apple M1 Max
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 10 default, 0 interactive, 5 GC (on 8 virtual cores)
Environment:
JULIA_NUM_THREADS = 10
julia> r = reinterpret(reshape, Int, fill(1 => 2))
2-element reinterpret(reshape, Int64, ::Array{Pair{Int64, Int64}, 0}) with eltype Int64:
fill(4538293232)
fill(4539746992)
julia> r[1], r[2], collect(r)
(1, 2, [1, 2])
julia> typeof(r)
Base.ReinterpretArray{Int64, 1, Pair{Int64, Int64}, Array{Pair{Int64, Int64}, 0}, true}
julia> typeof(fill(4538293232))
Array{Int64, 0}
julia> eltype(r)
Int64
Metadata
Metadata
Assignees
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcorrectness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwingBugs that are likely to lead to incorrect results in user code without throwing