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

Function PyArray_Max

numpy/core/src/multiarray/calculation.c:233–247  ·  view source on GitHub ↗

NUMPY_API * Max */

Source from the content-addressed store, hash-verified

231 * Max
232 */
233NPY_NO_EXPORT PyObject *
234PyArray_Max(PyArrayObject *ap, int axis, PyArrayObject *out)
235{
236 PyArrayObject *arr;
237 PyObject *ret;
238
239 arr = (PyArrayObject *)PyArray_CheckAxis(ap, &axis, 0);
240 if (arr == NULL) {
241 return NULL;
242 }
243 ret = PyArray_GenericReduceFunction(arr, n_ops.maximum, axis,
244 PyArray_DESCR(arr)->type_num, out);
245 Py_DECREF(arr);
246 return ret;
247}
248
249/*NUMPY_API
250 * Min

Callers 1

PyArray_PtpFunction · 0.85

Calls 3

PyArray_CheckAxisFunction · 0.85
PyArray_DESCRFunction · 0.85

Tested by

no test coverage detected