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

Function _check_has_fields

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

Source from the content-addressed store, hash-verified

3490}
3491
3492static int
3493_check_has_fields(PyArray_Descr *self)
3494{
3495 if (!PyDataType_HASFIELDS(self)) {
3496 PyErr_Format(PyExc_KeyError, "There are no fields in dtype %S.", self);
3497 return -1;
3498 }
3499 else {
3500 return 0;
3501 }
3502}
3503
3504static PyObject *
3505_subscript_by_name(PyArray_Descr *self, PyObject *op)

Callers 1

descr_subscriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected