MCPcopy Create free account
hub / github.com/numpy/numpy / set_overflow

Function set_overflow

numpy/core/src/umath/_rational_tests.c:20–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18/* #define ACQUIRE_GIL */
19
20static void
21set_overflow(void) {
22#ifdef ACQUIRE_GIL
23 /* Need to grab the GIL to dodge a bug in numpy */
24 PyGILState_STATE state = PyGILState_Ensure();
25#endif
26 if (!PyErr_Occurred()) {
27 PyErr_SetString(PyExc_OverflowError,
28 "overflow in rational arithmetic");
29 }
30#ifdef ACQUIRE_GIL
31 PyGILState_Release(state);
32#endif
33}
34
35static void
36set_zero_divide(void) {

Callers 7

safe_negFunction · 0.85
safe_abs32Function · 0.85
safe_abs64Function · 0.85
lcmFunction · 0.85
make_rational_intFunction · 0.85
make_rational_slowFunction · 0.85
make_rational_fastFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected