JuliaMath / JuliaMath/Interpolations.jl
Type promotion
- Dominant language
- Julia
- Stars
- 575
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Description
It seems interpolating static arrays of eltype Float32 causes a type promotion to Float64:
```
julia> interpolate([@SVector(rand(Float32, 3)) for i=1:5], BSpline(Linear()))
5-element interpolate(::Array{SArray{Tuple{3},Float32,1,3},1}, BSpline(Linear())) with element type SArray{Tuple{3},Float64,1,3}:
Float32[0.40708745, 0.08114183, 0.64380157]
Float32[0.889678, 0.40728843, 0.3275386]
Float32[0.064697385, 0.27480924, 0.08783579]
Float32[0.21843159, 0.546651, 0.7467506]
Float32[0.6662456, 0.8931141, 0.17646503]
```
It says: `with element type SVector{3,Float64}`
Is that expected?
It seems to be hitting `tweight(A::AbstractArray) = Float64`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.