Skip to content

Commit

Permalink
handle interp for integers by casting and rounding (invenia#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpa28-git committed Mar 5, 2024
1 parent 687c56a commit ee9856d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/imputors/interp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,9 @@ function _impute!(data::AbstractVector{<:Union{T, Missing}}, imp::Interpolate) w

return data
end

function _impute!(data::AbstractVector{<:Union{T, Missing}}, imp::Interpolate) where {T<:Union{Signed, Unsigned}}
dataf = _impute!(float(data), imp)
data .= round.(Union{T, Missing}, dataf)
return data
end

0 comments on commit ee9856d

Please sign in to comment.