Skip to content

Commit ed234c5

Browse files
committed
use cross-platform <double>NAN
1 parent 0115e6c commit ed234c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/src/generate_code.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
PyTuple_New)
2323
from cpython cimport PyFloat_Check
2424
cimport cpython
25-
cdef double NAN = <double> np.nan
25+
26+
cdef extern from "numpy/npy_math.h":
27+
double NAN "NPY_NAN"
2628
2729
import numpy as np
2830
isnan = np.isnan

0 commit comments

Comments
 (0)