We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here equality of NaN_1 to NaN fails
NaN_1
NaN
using SentinelArrays NaN_1 = reinterpret(Float64, 0xffffd10000000000) NaN_2 = reinterpret(Float64, 0x7ff8000000000000) SentinelArray([NaN_1, 1.1], NaN, missing) # [NaN, 1.1] SentinelArray([NaN_2, 2.2], NaN, missing) # [missing, 2.2]
Guessing: here https://github.com/JuliaData/SentinelArrays.jl/blob/v1.4.5/src/SentinelArrays.jl#L184-L185 defines to use === as comparison. Docstring for NaN says
===
Always use isnan or isequal for checking for NaN. Using x === NaN may give unexpected results
Julia 1.10.5, SentinelArrays v1.4.5
The text was updated successfully, but these errors were encountered:
Commenting out the line https://github.com/JuliaData/SentinelArrays.jl/blob/v1.4.6/src/SentinelArrays.jl#L185
eq(x::T, y::T) where {T <: Real} = x === y
fixes the above bug, and tests pass locally as well.
Sorry, something went wrong.
No branches or pull requests
Here equality of
NaN_1
toNaN
failsGuessing: here https://github.com/JuliaData/SentinelArrays.jl/blob/v1.4.5/src/SentinelArrays.jl#L184-L185 defines to use
===
as comparison. Docstring forNaN
saysJulia 1.10.5, SentinelArrays v1.4.5
The text was updated successfully, but these errors were encountered: