NUMPY_API * Get a pointer to the index, if it is being tracked */
| 1208 | * Get a pointer to the index, if it is being tracked |
| 1209 | */ |
| 1210 | NPY_NO_EXPORT npy_intp * |
| 1211 | NpyIter_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) |