JuliaMath / JuliaMath/Interpolations.jl
Extrapolate does not preserve color channel type from fill value
- Dominant language
- Julia
- Stars
- 575
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Description
I'm not too familiar with how Interpolations deal with types, but this behavior seems quite strange. If you use types from Colors.jl, the values inside the domain get computed as colors just fine, except it becomes Float64. If a color type is provided as a fill value to `extrapolate`, though, the color type gets dropped, and we end up with the underlying type. Is this a bug or a feature? How can we better deal with this?
```
julia> itp = extrapolate(interpolate(Gray{Float32}.(randn(Float32,33,33)), Lanczos4OpenCV()), Gray{Float32}(0f0));
julia> typeof(itp(10,10))
Gray{Float64}
julia> typeof(itp(0,0))
Float32
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.