Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DiskArrayTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function CFDiskArray(a::AbstractArray{T}, attr::Dict) where T
S,mv = if mv === nothing
T_pure,mv
else
Union{T_pure,Missing},convert(T_pure,mv)
Union{T_pure,Missing},mv
end
CFDiskArray{S,ndims(a),typeof(mv),typeof(a),typeof(offs)}(a, mv, offs, sc)
end
Expand Down
6 changes: 6 additions & 0 deletions test/cfdiskarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ b = CFDiskArray([1.0f0, 2.0f0],
"scale_factor" => 1.0))
@test eltype(b) == Float32

b = CFDiskArray([10, -9999],
Dict("scale_factor" => Float16(0.1),
"missing_value" => -9999))
@test eltype(b) == Union{Missing, Float16}
@test ismissing(b[2])

# CF conventions prescribe a "_FillValue field"
b = CFDiskArray([1.0f0, 2.0f0],
Dict("_FillValue" => NaN32))
Expand Down
Loading