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

Function PyRational_FromRational

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

Source from the content-addressed store, hash-verified

373}
374
375static PyObject*
376PyRational_FromRational(rational x) {
377 PyRational* p = (PyRational*)PyRational_Type.tp_alloc(&PyRational_Type,0);
378 if (p) {
379 p->r = x;
380 }
381 return (PyObject*)p;
382}
383
384static PyObject*
385pyrational_new(PyTypeObject* type, PyObject* args, PyObject* kwds) {

Callers 2

pyrational_newFunction · 0.85
npyrational_getitemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected