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

Function npyiter_close

numpy/core/src/multiarray/nditer_pywrap.c:2331–2347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2329}
2330
2331static PyObject *
2332npyiter_close(NewNpyArrayIterObject *self, PyObject *NPY_UNUSED(args))
2333{
2334 NpyIter *iter = self->iter;
2335 int ret;
2336 if (self->iter == NULL) {
2337 Py_RETURN_NONE;
2338 }
2339 ret = NpyIter_Deallocate(iter);
2340 self->iter = NULL;
2341 Py_XDECREF(self->nested_child);
2342 self->nested_child = NULL;
2343 if (ret != NPY_SUCCEED) {
2344 return NULL;
2345 }
2346 Py_RETURN_NONE;
2347}
2348
2349static PyObject *
2350npyiter_exit(NewNpyArrayIterObject *self, PyObject *NPY_UNUSED(args))

Callers 1

npyiter_exitFunction · 0.85

Calls 1

NpyIter_DeallocateFunction · 0.85

Tested by

no test coverage detected