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

Function _setlist_pkl

numpy/core/src/multiarray/methods.c:1793–1812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1791}
1792
1793static int
1794_setlist_pkl(PyArrayObject *self, PyObject *list)
1795{
1796 PyObject *theobject;
1797 PyArrayIterObject *iter = NULL;
1798 PyArray_SetItemFunc *setitem;
1799
1800 setitem = PyArray_DESCR(self)->f->setitem;
1801 iter = (PyArrayIterObject *)PyArray_IterNew((PyObject *)self);
1802 if (iter == NULL) {
1803 return -1;
1804 }
1805 while(iter->index < iter->size) {
1806 theobject = PyList_GET_ITEM(list, iter->index);
1807 setitem(theobject, iter->dataptr, self);
1808 PyArray_ITER_NEXT(iter);
1809 }
1810 Py_XDECREF(iter);
1811 return 0;
1812}
1813
1814
1815static PyObject *

Callers 1

array_setstateFunction · 0.85

Calls 2

PyArray_DESCRFunction · 0.85
PyArray_IterNewFunction · 0.85

Tested by

no test coverage detected