| 1426 | } |
| 1427 | |
| 1428 | static PyObject * |
| 1429 | npyiter_operands_get(NewNpyArrayIterObject *self, void *NPY_UNUSED(ignored)) |
| 1430 | { |
| 1431 | PyObject *ret; |
| 1432 | |
| 1433 | npy_intp iop, nop; |
| 1434 | PyArrayObject **operands; |
| 1435 | |
| 1436 | if (self->iter == NULL) { |
| 1437 | PyErr_SetString(PyExc_ValueError, |
| 1438 | "Iterator is invalid"); |
| 1439 | return NULL; |
| 1440 | } |
| 1441 | nop = NpyIter_GetNOp(self->iter); |
| 1442 | operands = self->operands; |
| 1443 | |
| 1444 | ret = PyTuple_New(nop); |
| 1445 | if (ret == NULL) { |
| 1446 | return NULL; |
| 1447 | } |
| 1448 | for (iop = 0; iop < nop; ++iop) { |
| 1449 | PyObject *operand = (PyObject *)operands[iop]; |
| 1450 | |
| 1451 | Py_INCREF(operand); |
| 1452 | PyTuple_SET_ITEM(ret, iop, operand); |
| 1453 | } |
| 1454 | |
| 1455 | return ret; |
| 1456 | } |
| 1457 | |
| 1458 | static PyObject * |
| 1459 | npyiter_itviews_get(NewNpyArrayIterObject *self, void *NPY_UNUSED(ignored)) |
nothing calls this directly
no test coverage detected