Skip to content

Commit

Permalink
Merge pull request #29 from tiemvanderdeure/typestable_cftransformdata
Browse files Browse the repository at this point in the history
fix type instability in `CFtransformdata`
  • Loading branch information
Alexander-Barth authored Jan 18, 2025
2 parents 86a1fce + 2c51741 commit eb9fb3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cfvariable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ end
CFtransform(data,fv,scale_factor,add_offset,time_origin,time_factor,maskingvalue,DTcast)

# in-place version
@inline function CFtransformdata!(out,data::AbstractArray{T,N},fv,scale_factor,add_offset,time_origin,time_factor,maskingvalue) where {T,N}
function CFtransformdata!(out,data::AbstractArray{T,N},fv,scale_factor,add_offset,time_origin,time_factor,maskingvalue) where {T,N}
DTcast = eltype(out)
@inbounds @simd for i in eachindex(data)
out[i] = CFtransform(data[i],fv,scale_factor,add_offset,time_origin,time_factor,maskingvalue,DTcast)
Expand Down

0 comments on commit eb9fb3b

Please sign in to comment.