Skip to content

Commit 731f4d1

Browse files
authored
Merge pull request #367 from npbarnes/patch-1
Add support for Unitful.jl numbers to FilledExtrapolations
2 parents cfb4d13 + 27be03d commit 731f4d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extrapolation/filled.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extrapolate(itp::AbstractInterpolation{T,N,IT}, fillvalue) where {T,N,IT} = Fill
3030
@inline function (etp::FilledExtrapolation{T,N})(x::Vararg{Number,N}) where {T,N}
3131
itp = parent(etp)
3232
coefs = coefficients(itp)
33-
Tret = typeof(prod(x) * zero(eltype(coefs)))
33+
Tret = promote_type(eltype(coefs), typeof.(x)...)
3434
if checkbounds(Bool, itp, x...)
3535
@inbounds itp(x...)
3636
else

0 commit comments

Comments
 (0)