| 312 | } |
| 313 | |
| 314 | static PyObject * |
| 315 | array_argmin(PyArrayObject *self, |
| 316 | PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames) |
| 317 | { |
| 318 | int axis = NPY_MAXDIMS; |
| 319 | PyArrayObject *out = NULL; |
| 320 | npy_bool keepdims = NPY_FALSE; |
| 321 | NPY_PREPARE_ARGPARSER; |
| 322 | if (npy_parse_arguments("argmin", args, len_args, kwnames, |
| 323 | "|axis", &PyArray_AxisConverter, &axis, |
| 324 | "|out", &PyArray_OutputConverter, &out, |
| 325 | "$keepdims", &PyArray_BoolConverter, &keepdims, |
| 326 | NULL, NULL, NULL) < 0) { |
| 327 | return NULL; |
| 328 | } |
| 329 | |
| 330 | PyObject *ret = _PyArray_ArgMinWithKeepdims(self, axis, out, keepdims); |
| 331 | |
| 332 | /* this matches the unpacking behavior of ufuncs */ |
| 333 | if (out == NULL) { |
| 334 | return PyArray_Return((PyArrayObject *)ret); |
| 335 | } |
| 336 | else { |
| 337 | return ret; |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | static PyObject * |
| 342 | array_max(PyArrayObject *self, PyObject *args, PyObject *kwds) |
nothing calls this directly
no test coverage detected