{"action":"opened","issue":{"url":"https://api.github.com/repos/JuliaMath/Interpolations.jl/issues/255","repository_url":"https://api.github.com/repos/JuliaMath/Interpolations.jl","labels_url":"https://api.github.com/repos/JuliaMath/Interpolations.jl/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/JuliaMath/Interpolations.jl/issues/255/comments","events_url":"https://api.github.com/repos/JuliaMath/Interpolations.jl/issues/255/events","html_url":"https://github.com/JuliaMath/Interpolations.jl/issues/255","id":370692887,"node_id":"MDU6SXNzdWUzNzA2OTI4ODc=","number":255,"title":"Inconsistent interpolation outcome on Float32 inputs","user":{"login":"cstjean","id":8622776,"node_id":"MDQ6VXNlcjg2MjI3NzY=","avatar_url":"https://avatars0.githubusercontent.com/u/8622776?v=4","gravatar_id":"","url":"https://api.github.com/users/cstjean","html_url":"https://github.com/cstjean","followers_url":"https://api.github.com/users/cstjean/followers","following_url":"https://api.github.com/users/cstjean/following{/other_user}","gists_url":"https://api.github.com/users/cstjean/gists{/gist_id}","starred_url":"https://api.github.com/users/cstjean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cstjean/subscriptions","organizations_url":"https://api.github.com/users/cstjean/orgs","repos_url":"https://api.github.com/users/cstjean/repos","events_url":"https://api.github.com/users/cstjean/events{/privacy}","received_events_url":"https://api.github.com/users/cstjean/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-16T16:21:06Z","updated_at":"2018-10-16T16:21:06Z","closed_at":null,"author_association":"NONE","body":"When `x::Vector{Int}` and `y::Vector{Float32}`, I expect the outcome to be a `Float32`, but it's inconsistent:\r\n\r\n```\r\njulia> interp = Interpolations.interpolate(([1,2,3],), [1.0f0, 2.0f0, 1.0f0], Interpolations.Gridded(Interpolations.Linear()));\r\n\r\njulia> interp(2)\r\n2.0\r\n\r\njulia> interp([2])\r\n1-element Array{Float64,1}:\r\n 2.0\r\n\r\njulia> ex = Interpolations.extrapolate(interp, NaN32);\r\n\r\njulia> ex(2)\r\n2.0\r\n\r\njulia> ex([2])\r\n1-element Array{Float32,1}:\r\n 2.0\r\n```\r\n\r\nIf my inputs are `Float32`, then all is fine, but for my use case, `x` is the number of seconds since some reference time, and I am a bit worried about the loss of precision that comes from early `Float32` conversion."}}
{"actor":{"display_login":"cstjean"}}