Skip to content

make [a, b] not concatenate #3737

Closed
Closed
@SamChill

Description

This works:

julia> [ 1:3, 4 ]
4-element Int64 Array:
 1
 2
 3
 4

and this works:

julia> Uint8[ 1:3 ]
3-element Uint8 Array:
 0x01
 0x02
 0x03

but this doesn't:

julia> Uint8[ 1:3, 4]
ERROR: no method convert(Type{Uint8},Range1{Int64})
 in setindex! at array.jl:392
 in getindex at array.jl:161

Is this expected behavior? I would expect to be able to construct Uint8 arrays this way.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    breakingThis change will break codeneeds decisionA decision on this change is needed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions