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

Function arraydescr_isnative_get

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

* return Py_True if this data-type descriptor * has native byteorder if no fields are defined * * or if all sub-fields have native-byteorder if * fields are defined */

Source from the content-addressed store, hash-verified

2204 * fields are defined
2205 */
2206static PyObject *
2207arraydescr_isnative_get(PyArray_Descr *self, void *NPY_UNUSED(ignored))
2208{
2209 PyObject *ret;
2210 int retval;
2211 retval = _arraydescr_isnative(self);
2212 if (retval == -1) {
2213 return NULL;
2214 }
2215 ret = retval ? Py_True : Py_False;
2216 Py_INCREF(ret);
2217 return ret;
2218}
2219
2220static PyObject *
2221arraydescr_isalignedstruct_get(PyArray_Descr *self, void *NPY_UNUSED(ignored))

Callers

nothing calls this directly

Calls 1

_arraydescr_isnativeFunction · 0.85

Tested by

no test coverage detected