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

Function unpack_scalar

numpy/core/src/multiarray/mapping.c:197–203  ·  view source on GitHub ↗

Unpack a single scalar index, taking a new reference to match unpack_tuple */

Source from the content-addressed store, hash-verified

195
196/* Unpack a single scalar index, taking a new reference to match unpack_tuple */
197static inline npy_intp
198unpack_scalar(PyObject *index, PyObject **result, npy_intp NPY_UNUSED(result_n))
199{
200 Py_INCREF(index);
201 result[0] = index;
202 return 1;
203}
204
205/**
206 * Turn an index argument into a c-array of `PyObject *`s, one for each index.

Callers 1

unpack_indicesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected