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

extrapolate[ VectorOfValues ] #128

Closed
floswald opened this issue Oct 21, 2016 · 0 comments · Fixed by #143
Closed

extrapolate[ VectorOfValues ] #128

floswald opened this issue Oct 21, 2016 · 0 comments · Fixed by #143

Comments

@floswald
Copy link

I was wondering whether you could support evaluating an extrapolation object at a vector, rather than only at a point (or how I would do that):

julia> x = [3z for z in linspace(0.0,1,10)]
julia> itp = interpolate((1:10,),x,Gridded(Linear()) 
julia> extp = extrapolate(itp,Linear()))
julia> itp[linspace(0.0,1.0,20)]
20-element Array{Float64,1}:
 -0.333333 
 -0.315789 
 -0.298246 
 -0.280702 
 -0.263158 
 -0.245614 
 -0.22807  
 -0.210526 
 -0.192982 
 -0.175439 
 -0.157895 
 -0.140351 
 -0.122807 
 -0.105263 
 -0.0877193
 -0.0701754
 -0.0526316
 -0.0350877
 -0.0175439
  0.0      

julia> extp[linspace(0.0,1.0,20)]
ERROR: MethodError: no method matching isless(::LinSpace{Float64}, ::Int64)

julia> extp[-1]
-0.6666666666666666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant