Skip to content

Commit 57ec164

Browse files
EvizeroTomas Lycken
authored andcommitted
Make Extrapolation a subtype of AbstractExtrapolation (#141)
1 parent c7ef5a5 commit 57ec164

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/extrapolation/extrapolation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
type Extrapolation{T,N,ITPT,IT,GT,ET} <: AbstractInterpolationWrapper{T,N,ITPT,IT,GT}
1+
type Extrapolation{T,N,ITPT,IT,GT,ET} <: AbstractExtrapolation{T,N,ITPT,IT,GT}
22
itp::ITPT
33
end
44
Extrapolation{T,ITPT,IT,GT,ET}(::Type{T}, N, itp::ITPT, ::Type{IT}, ::Type{GT}, et::ET) =

test/extrapolation/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ A = Float64[f(x) for x in 1:xmax]
1111
itpg = interpolate(A, BSpline(Linear()), OnGrid())
1212

1313
etpg = extrapolate(itpg, Flat())
14+
@test typeof(etpg) <: AbstractExtrapolation
1415

1516
@test etpg[-3] == etpg[-4.5] == etpg[0.9] == etpg[1.0] == A[1]
1617
@test etpg[10.1] == etpg[11] == etpg[148.298452] == A[end]

0 commit comments

Comments
 (0)