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)
779779 npy_##typename fval = (double_to_float)(dval); \
780780 \
781781 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+ } \
788786 } \
789787 \
790788 *out = fval; \
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ PyInit__main(void)
9292 if (_import_array () < 0 ) {
9393 return NULL ;
9494 }
95- if (import_experimental_dtype_api (12 ) < 0 ) {
95+ if (import_experimental_dtype_api (13 ) < 0 ) {
9696 return NULL ;
9797 }
9898
You can’t perform that action at this time.
0 commit comments