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

Function _get_keywords

numpy/core/src/multiarray/number.c:208–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208static PyObject *
209_get_keywords(int rtype, PyArrayObject *out)
210{
211 PyObject *kwds = NULL;
212 if (rtype != NPY_NOTYPE || out != NULL) {
213 kwds = PyDict_New();
214 if (rtype != NPY_NOTYPE) {
215 PyArray_Descr *descr;
216 descr = PyArray_DescrFromType(rtype);
217 if (descr) {
218 PyDict_SetItemString(kwds, "dtype", (PyObject *)descr);
219 Py_DECREF(descr);
220 }
221 }
222 if (out != NULL) {
223 PyDict_SetItemString(kwds, "out", (PyObject *)out);
224 }
225 }
226 return kwds;
227}
228
229NPY_NO_EXPORT PyObject *
230PyArray_GenericReduceFunction(PyArrayObject *m1, PyObject *op, int axis,

Calls

no outgoing calls

Tested by

no test coverage detected