Open
Description
opened on Dec 7, 2024
The following issue is present on both julia 1.10.7 and 1.11.2
julia> x = [ones(2,3) for _=1:4]; # CORRECT BEHAVIOR
julia> stack(x, dims=1) |> size
(4, 2, 3)
julia> stack(x, dims=2) |> size
(2, 4, 3)
julia> stack(x, dims=3) |> size
(2, 3, 4)
julia> y = AbstractArray[ones(2,3) for _=1:4]; # NOW THE PROBLEM
julia> stack(y, dims=1) |> size
(4, 2, 3)
julia> stack(y, dims=2) |> size # THIS IS WRONG
(2, 3, 4)
julia> stack(y, dims=3) |> size
(2, 3, 4)
julia> stack(y, dims=2) == stack(y, dims=3) # THIS IS WRONG
true
With y = Any[ones(2,3) for _=1:4]
no problems instead.
Activity