File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
stringdtype/stringdtype/src Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -779,12 +779,10 @@ string_to_pyfloat(char *in)
779
779
npy_##typename fval = (double_to_float)(dval); \
780
780
\
781
781
if (NPY_UNLIKELY(isinf_name(fval) && !(npy_isinf(dval)))) { \
782
- /* we need to somehow use numpy's floating point error */ \
783
- /* handling, which supports lots more functionality but */ \
784
- /* isn't exposed in the C API */ \
785
- PyErr_SetString (PyExc_FloatingPointError , \
786
- "overflow encountered in cast" ); \
787
- return -1 ; \
782
+ if (PyUFunc_GiveFloatingpointErrors("cast", \
783
+ NPY_FPE_OVERFLOW) < 0) { \
784
+ return -1; \
785
+ } \
788
786
} \
789
787
\
790
788
*out = fval; \
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ PyInit__main(void)
92
92
if (_import_array () < 0 ) {
93
93
return NULL ;
94
94
}
95
- if (import_experimental_dtype_api (12 ) < 0 ) {
95
+ if (import_experimental_dtype_api (13 ) < 0 ) {
96
96
return NULL ;
97
97
}
98
98
You can’t perform that action at this time.
0 commit comments