Skip to content

Corner cases of hvcat [...] syntax: column matrices #342

Closed
@toivoh

Description

@toivoh

hvcat concatenation syntax produces matrices, such as in

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

julia> [1 2]
1×2 Array{Int64,2}:
 1  2

But there is no corresponding way to create a single column matrix:

julia> [1; 3]
2-element Array{Int64,1}:
 1
 3

julia> [1;]
1-element Array{Int64,1}:
 1

I suggest that the latter should invoke hvcat and not vcat, to produce matrices. This implies that there would be no special vcat syntax any more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions