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

Function make_rational_int

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

Source from the content-addressed store, hash-verified

129} rational;
130
131static inline rational
132make_rational_int(npy_int64 n) {
133 rational r = {(npy_int32)n,0};
134 if (r.n != n) {
135 set_overflow();
136 }
137 return r;
138}
139
140static rational
141make_rational_slow(npy_int64 n_, npy_int64 d_) {

Callers 5

rational_remainderFunction · 0.85
scan_rationalFunction · 0.85
RATIONAL_BINOPFunction · 0.85
npyrational_setitemFunction · 0.85
pyrational_richcompareFunction · 0.85

Calls 1

set_overflowFunction · 0.85

Tested by

no test coverage detected