You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting rid of this is hard; this is literally how CPython communicates errors, we are not doing something wrong here. This is an extremely pedantic warning; I'd recommend not enabling it (or passing -Wno-float-equal) on code that uses CPython (including pybind11). It's really just trying to protect you from comparing computed values, something like .1 + .2 == .3.
If someone wanted to put warning suppression pragmas around everything in pybind11, we probably could review such a patch, as long as it wasn't too long.
Activity
henryiii commentedon Jun 3, 2025
Getting rid of this is hard; this is literally how CPython communicates errors, we are not doing something wrong here. This is an extremely pedantic warning; I'd recommend not enabling it (or passing
-Wno-float-equal) on code that uses CPython (including pybind11). It's really just trying to protect you from comparing computed values, something like.1 + .2 == .3.If someone wanted to put warning suppression pragmas around everything in pybind11, we probably could review such a patch, as long as it wasn't too long.