Skip to content
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

CLN: use isnan() instead of the Py_IS_NAN macro #58850

Merged
merged 1 commit into from
May 30, 2024
Merged

CLN: use isnan() instead of the Py_IS_NAN macro #58850

merged 1 commit into from
May 30, 2024

Conversation

skirpichev
Copy link
Contributor

Since 3.11 the later is just an alias for isnan(). See also python/cpython#119613

Since 3.11 the later is just an alias for isnan().  See also
python/cpython#119613
@WillAyd
Copy link
Member

WillAyd commented May 28, 2024

What about Python 3.10? Noted on the C99 requirement (we actually require a C11 compiler anyway) but are these macros equivalent still on 3.10 or is there a possibility of a behavior difference?

@skirpichev
Copy link
Contributor Author

There is. If you support platforms without IEEE 754, without NaN, and without C99+ <math.h>. Macroses were more complex to cover such cases, e.g.:
https://github.com/python/cpython/blob/c8f868dc52f98011d0f9b459b6487920bfb0ac4d/Include/pymath.h#L97-L103

@WillAyd
Copy link
Member

WillAyd commented May 28, 2024

OK thanks for that info. I think we are OK with this as is then. Appreciate the PR

@WillAyd WillAyd added the Clean label May 28, 2024
@WillAyd
Copy link
Member

WillAyd commented May 28, 2024

@mroeschke

@WillAyd WillAyd merged commit a564662 into pandas-dev:main May 30, 2024
51 checks passed
@WillAyd
Copy link
Member

WillAyd commented May 30, 2024

Thanks @skirpichev

@mroeschke mroeschke added this to the 3.0 milestone May 31, 2024
@skirpichev skirpichev deleted the no-py-is-nan branch May 31, 2024 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants