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

Function boundarraymethod_repr

numpy/core/src/multiarray/array_method.c:512–526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510
511
512static PyObject *
513boundarraymethod_repr(PyBoundArrayMethodObject *self)
514{
515 int nargs = self->method->nin + self->method->nout;
516 PyObject *dtypes = PyArray_TupleFromItems(
517 nargs, (PyObject **)self->dtypes, 0);
518 if (dtypes == NULL) {
519 return NULL;
520 }
521 PyObject *repr = PyUnicode_FromFormat(
522 "<np._BoundArrayMethod `%s` for dtypes %S>",
523 self->method->name, dtypes);
524 Py_DECREF(dtypes);
525 return repr;
526}
527
528
529static void

Callers

nothing calls this directly

Calls 1

PyArray_TupleFromItemsFunction · 0.85

Tested by

no test coverage detected