Skip to content

Promote eltypes on construction instead of defaulting to Float64 #24

@jonniedie

Description

@jonniedie

Right now this happens:

julia> x = ComponentArray(a=1, b=2f0)
ComponentVector{Float64}(a = 1.0, b = 2.0)

when this should happen:

julia> x = ComponentArray(a=1, b=2f0)
ComponentVector{Float32}(a = 1.0, b = 2.0)

We also want this (which currently errors):

julia> x = ComponentArray(a=1, b=missing)
ComponentVector{Union{Missing, Int64}}(a = 1, b = missing)

julia> x = ComponentArray(a=1, b=2+im)
ComponentVector{Complex{Int64}}(a = 1 + 0im, b = 2 + 1im)
``

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