# Problem with \`Interpolations.jl\`?

**URL:** <https://discourse.julialang.org/t/problem-with-interpolations-jl/100236>\
**Category:** General Usage\
**Created:** [June 12, 2023, 3:51pm UTC](https://discourse.julialang.org/t/problem-with-interpolations-jl/100236 "2023-06-12T15:51:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![frylock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frylock/32/50213_2.png) [@frylock](https://discourse.julialang.org/u/frylock)\
**Post date:** [June 12, 2023, 3:51pm UTC](https://discourse.julialang.org/t/problem-with-interpolations-jl/100236/1 "2023-06-12T15:51:27Z")

</div>

I’m running 1.9.1, and trying to follow along with the documentation.

```julia
xs = 1:0.2:5
A = log.(xs) 
linear_interpolation(xs, A) # works fine
linear_interpolation(xs, A,extrapolation_bc=Line()) # also works fine
extrapolate(scale(interpolate(A, BSpline(Linear())), xs)) # throws an error:

```

```julia
ERROR: MethodError: no method matching extrapolate(::ScaledInterpolation{Float64, 1, Interpolations.BSplineInterpolation{Float64, 1, Vector{Float64}, BSpline{Linear{Throw{OnGrid}}}, Tuple{Base.OneTo{Int64}}}, BSpline{Linear{Throw{OnGrid}}}, Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}})

Closest candidates are:
  extrapolate(::AbstractInterpolation{T, N, IT}, ::ET) where {T, N, IT, ET<:Union{Tuple{Vararg{Union{Tuple{Interpolations.BoundaryCondition, Interpolations.BoundaryCondition}, Interpolations.BoundaryCondition}}}, Interpolations.BoundaryCondition}}
   @ Interpolations ~/.julia/packages/Interpolations/nDwIa/src/extrapolation/extrapolation.jl:40
  extrapolate(::AbstractInterpolation{T, N, IT}, ::Union{Tuple{Vararg{Union{Tuple{Interpolations.Flag, Interpolations.Flag}, Interpolations.Flag}}}, Interpolations.Flag}) where {T, N, IT}
   @ Interpolations ~/.julia/packages/Interpolations/nDwIa/src/deprecations.jl:41
  extrapolate(::AbstractInterpolation{T, N, IT}, ::Any) where {T, N, IT}
   @ Interpolations ~/.julia/packages/Interpolations/nDwIa/src/extrapolation/filled.jl:28

Stacktrace:
 [1] top-level scope
   @ REPL[7]:1

```

---

<div class="post-metadata">

**Author:** ![70Gage70](https://avatars.discourse-cdn.com/v4/letter/7/e68b1a/32.png) [@70Gage70](https://discourse.julialang.org/u/70Gage70)\
**Post date:** [June 12, 2023, 4:22pm UTC](https://discourse.julialang.org/t/problem-with-interpolations-jl/100236/2 "2023-06-12T16:22:30Z")

</div>

I think `extrapolate` should have an extra argument:

```julia
extrapolate(scale(interpolate(A, BSpline(Linear())), xs), Line())

```

---

<div class="post-metadata">

**Author:** ![frylock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frylock/32/50213_2.png) [@frylock](https://discourse.julialang.org/u/frylock)\
**Post date:** [June 12, 2023, 4:25pm UTC](https://discourse.julialang.org/t/problem-with-interpolations-jl/100236/3 "2023-06-12T16:25:15Z")

</div>

Ok - thanks, I just copy-pasted out of the project tutorial on [github](http://juliamath.github.io/Interpolations.jl/latest/).

---

<div class="post-metadata">

**Author:** ![70Gage70](https://avatars.discourse-cdn.com/v4/letter/7/e68b1a/32.png) [@70Gage70](https://discourse.julialang.org/u/70Gage70)\
**Post date:** [June 12, 2023, 4:50pm UTC](https://discourse.julialang.org/t/problem-with-interpolations-jl/100236/4 "2023-06-12T16:50:08Z")

</div>

I will let them know
