Skip to content

Concatenation with I (UniformScaling) fails with numbers #666

@mbauman

Description

@mbauman

This works:

julia> [I     [2,3]
        [4 5] [6]]
3×3 Array{Int64,2}:
 1  0  2
 0  1  3
 4  5  6

And this works:

julia> [[1 0; 0 1] [2,3]
        [4 5]      6]
3×3 Array{Int64,2}:
 1  0  2
 0  1  3
 4  5  6

But this fails:

julia> [I     [2,3]
        [4 5] 6]
ERROR: DimensionMismatch("mismatch in dimension 1 (expected 1 got 2)")
Stacktrace:
 [1] cat_shape(::Tuple{Bool,Bool}, ::Tuple{}, ::Tuple{Int64}, ::Tuple{Int64}) at ./abstractarray.jl:1421
 [2] _cat_t(::Val{2}, ::Type, ::UniformScaling{Bool}, ::Vararg{Any,N} where N) at ./abstractarray.jl:1441
 [3] #cat_t#103(::Val{2}, ::typeof(Base.cat_t), ::Type{Any}, ::UniformScaling{Bool}, ::Vararg{Any,N} where N) at ./abstractarray.jl:1438
 [4] (::Base.var"#kw##cat_t")(::NamedTuple{(:dims,),Tuple{Val{2}}}, ::typeof(Base.cat_t), ::Type{Any}, ::UniformScaling{Bool}, ::Vararg{Any,N} where N) at ./none:0
 [5] typed_hcat(::Type, ::UniformScaling{Bool}, ::Array{Int64,1}) at ./abstractarray.jl:1548
 [6] typed_hvcat(::Type{Any}, ::Tuple{Int64,Int64}, ::UniformScaling{Bool}, ::Vararg{Any,N} where N) at ./abstractarray.jl:1738
 [7] hvcat(::Tuple{Int64,Int64}, ::UniformScaling{Bool}, ::Vararg{Any,N} where N) at ./abstractarray.jl:1716
 [8] top-level scope at REPL[42]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions