Skip to content

convert(T, y) is not always a T #266

Open
@gdalle

Description

@gdalle

Is this expected?

julia> using ComponentArrays

julia> x = ComponentVector(a = [1, 2])
ComponentVector{Int64}(a = [1, 2])

julia> M = hcat(x, x)
2×2 ComponentMatrix{Int64} with axes Axis(a = 1:2,) × FlatAxis()
 1  1
 2  2

julia> y = convert(typeof(x), view(M, :, 1))
ComponentVector{Int64,SubArray...}(a = [1, 2])

julia> y isa typeof(x)
false

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