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

Function _subscript_by_index

numpy/core/src/multiarray/descriptor.c:3520–3533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3518}
3519
3520static PyObject *
3521_subscript_by_index(PyArray_Descr *self, Py_ssize_t i)
3522{
3523 PyObject *name = PySequence_GetItem(self->names, i);
3524 PyObject *ret;
3525 if (name == NULL) {
3526 PyErr_Format(PyExc_IndexError,
3527 "Field index %zd out of range.", i);
3528 return NULL;
3529 }
3530 ret = _subscript_by_name(self, name);
3531 Py_DECREF(name);
3532 return ret;
3533}
3534
3535static npy_bool
3536_is_list_of_strings(PyObject *obj)

Callers 1

descr_subscriptFunction · 0.85

Calls 1

_subscript_by_nameFunction · 0.85

Tested by

no test coverage detected