JuliaPhysics / JuliaPhysics/Unitful.jl

unit() function not supporting log units

Open
#528 0 comments 0 reactions 0 assignees View on GitHub
logarithmic
Dominant language
Julia
Stars
675
Forks
124
Avg merge
3h 38m
Merged PRs (30d)
1

Description

As per the title, the unit function doesn't work for log units. Tested for dB and V_mag (UnitfulAstro)

```julia
julia> unit(1.0u"dB") == u"dB"
false

julia> unit(1.0u"m") == u"m"
true

julia> unit(1.0u"rad") == u"rad"
true
```

The return is as below. I compared this to radians for another NoDims unit:

```julia
julia> unit(1.0u"dB") |> typeof
Unitful.FreeUnits{(), NoDims, nothing}

julia> unit(1.0u"rad") |> typeof
Unitful.FreeUnits{(rad,), NoDims, nothing}

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.