Skip to content

uconvert(PVector, units) not typestable #27

@elehcim

Description

@elehcim

I have a problem regarding unit conversion which seems to change the datatype.

For example:

source_units = getuVel(uGadget2);
target_units = getuVel(uAstro);
v = PVector(3.f0, 3.f0, 4.f0, source_units);
println(typeof(uconvert(target_units, v.x)))
     Quantity{Float64, 𝐋 𝐓^-1, Unitful.FreeUnits{(Gyr^-1, kpc), 𝐋 𝐓^-1, nothing}}

but I'd like it to stay a Float32.

See JuliaAstroSim/AstroIO.jl#10 (comment)

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