-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document Unitful.jl compatibility #796
Labels
documentation
Improvements or additions to documentation
Comments
I use Rasters of units all the time. Its just your missingval Use Or |
This works fine: julia> Raster([1.0, 2.0, missing], (X(),), missingval=missing) .* u"mm"
╭─────────────────────────────────────────────────────────────────────────────────╮
│ 3-element Raster{Union{Missing, Quantity{Float64, 𝐋, Unitful.FreeUnits{(mm,), 𝐋,
nothing}}},1} │
├─────────────────────────────────────────────────────────────────────────── dims ┤
↓ X
├───────────────────────────────────────────────────────────────────────── raster ┤
extent: Extent(X = (1, 3),)
missingval: missing
└─────────────────────────────────────────────────────────────────────────────────┘
1.0 mm
2.0 mm
missing Or to use some other missingval this works: julia> @d Raster([1.0, 2.0, 0.0], (X(),), missingval=0.0) .* u"mm" missingval=0.0u"
mm"
╭────────────────────────────────────────────────────────────────────────────────╮
│ 3-element Raster{Quantity{Float64, 𝐋, Unitful.FreeUnits{(mm,), 𝐋, nothing}},1} │
├────────────────────────────────────────────────────────────────────────── dims ┤
↓ X
├──────────────────────────────────────────────────────────────────────── raster ┤
extent: Extent(X = (1, 3),)
missingval: 0.0 mm
└────────────────────────────────────────────────────────────────────────────────┘
1.0 mm
2.0 mm
0.0 mm |
Hmm maybe we should document the units/missingval interaction a bit better. It wont be as important when |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is super low priority, I just tried it out on a lark.
The text was updated successfully, but these errors were encountered: