Skip to content

Commit

Permalink
fix aqua
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Jan 9, 2025
1 parent 36a7391 commit f3e98ac
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions src/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,6 @@ struct Raster{T,N,D<:Tuple,R<:Tuple,A<:AbstractArray{T,N},Na,Me,Mi<:Union{T,Noth
new{T,N,D,R,A,Na,Me,typeof(missingval1)}(data, dims, refdims, name, metadata, missingval1)
end
end
Raster(f::Function, args...; kw...) = Raster(args...; f, kw...)
# For ambiguity with dataset methods
Raster(f::Function, s::AbstractString; kw...) = Raster(s; f, kw...)
# Create a Raster from and AbstractArray and dims
function Raster(A::AbstractArray{T,N}, dims::Tuple;
refdims=(),
Expand Down
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ _type_missingval(::Type{T}) where T = _type_missingval1(Missings.nonmissingtype(

_type_missingval1(::Type{T}) where T<:Number = typemin(T)
_type_missingval1(::Type{T}) where T<:Unsigned = typemax(T)
_type_missingval1(::Type{<:AbstractString}) where T = T("")
_type_missingval1(::Type{T}) where T<:AbstractString = T("")

_fix_missingval(::Type, ::Union{NoKW,Nothing}) = nothing
_fix_missingval(::AbstractArray, ::Nothing) = nothing
Expand Down
1 change: 0 additions & 1 deletion test/warp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ gdalpath = maybedownload(url)
@test size(warped) == (720, 721)
# the crs is rotated so the image is rotated an all four corners should be missing
missingval(warped) === 0xff
parent(warped)
@test warped[1, 1] === warped[1, end] === warped[end, 1] === warped[end, end] === 0xff == missingval(warped)
# now compute mean squared error of the back transformation
res = map(step, lookup(r))
Expand Down

0 comments on commit f3e98ac

Please sign in to comment.