-
Notifications
You must be signed in to change notification settings - Fork 113
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
promote FixedPointNumber to float when necessary #413
Comments
I think we have two separate issues here:
julia> r = reinterpret(N0f8,[0x73, 0x94, 0x66, 0x1e])
4-element reinterpret(N0f8, ::Vector{UInt8}):
0.451N0f8
0.58N0f8
0.4N0f8
0.118N0f8
julia> interpolate(r, BSpline(Quadratic(Flat(OnGrid()))))
4-element interpolate(OffsetArray(::Array{N0f8,1}, 0:5), BSpline(Quadratic(Flat(OnGrid())))) with element type Float64:
Error showing value of type Interpolations.BSplineInterpolation{Float64, 1, OffsetArrays.OffsetVector{N0f8, Vector{N0f8}}, BSpline{Quadratic{Flat{OnGrid}}}, Tuple{Base.OneTo{Int64}}}:
ERROR: promotion of types Ratios.SimpleRatio{Int64} and N0f8 failed to change any arguments The direct fix belongs to If you would like, open up an issue on Ratios.jl and I'll join you there. |
Sounds valid to me. Feel free to close if you think there's nothing needs to do here. |
JuliaImages widely uses
FixedPointNumbers.N0f8
, which is internally anUInt8
, to represent [0,1] range. It seems thatinterpolate
fails to promote the datatype for some interpolation types:error stack
The text was updated successfully, but these errors were encountered: