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

Function array_reduce_ex_regular

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

Source from the content-addressed store, hash-verified

1894}
1895
1896static PyObject *
1897array_reduce_ex_regular(PyArrayObject *self, int NPY_UNUSED(protocol))
1898{
1899 PyObject *subclass_array_reduce = NULL;
1900 PyObject *ret;
1901
1902 /* We do not call array_reduce directly but instead lookup and call
1903 * the __reduce__ method to make sure that it's possible to customize
1904 * pickling in sub-classes. */
1905 subclass_array_reduce = PyObject_GetAttrString((PyObject *)self,
1906 "__reduce__");
1907 if (subclass_array_reduce == NULL) {
1908 return NULL;
1909 }
1910 ret = PyObject_CallObject(subclass_array_reduce, NULL);
1911 Py_DECREF(subclass_array_reduce);
1912 return ret;
1913}
1914
1915static PyObject *
1916array_reduce_ex_picklebuffer(PyArrayObject *self, int protocol)

Callers 2

array_reduce_exFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected