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

Function NpyIter_GetIndexPtr

numpy/core/src/multiarray/nditer_api.c:1210–1226  ·  view source on GitHub ↗

NUMPY_API * Get a pointer to the index, if it is being tracked */

Source from the content-addressed store, hash-verified

1208 * Get a pointer to the index, if it is being tracked
1209 */
1210NPY_NO_EXPORT npy_intp *
1211NpyIter_GetIndexPtr(NpyIter *iter)
1212{
1213 npy_uint32 itflags = NIT_ITFLAGS(iter);
1214 /*int ndim = NIT_NDIM(iter);*/
1215 int nop = NIT_NOP(iter);
1216
1217 NpyIter_AxisData *axisdata = NIT_AXISDATA(iter);
1218
1219 if (itflags&NPY_ITFLAG_HASINDEX) {
1220 /* The index is just after the data pointers */
1221 return (npy_intp*)NAD_PTRS(axisdata) + nop;
1222 }
1223 else {
1224 return NULL;
1225 }
1226}
1227
1228/*NUMPY_API
1229 * Gets an array of read flags (1 per object being iterated)

Callers 1

npyiter_index_getFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected