Skip to content
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

handle interp for integers by casting and rounding (#71) #142

Merged
merged 9 commits into from
Apr 19, 2024
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}}
rofinn marked this conversation as resolved.
Show resolved Hide resolved
dataf = _impute!(float(data), imp)
data .= round.(Union{T, Missing}, dataf)
return data
end