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

Function _keepdims_converter

numpy/core/src/umath/ufunc_object.c:899–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

897}
898
899static int
900_keepdims_converter(PyObject *obj, int *keepdims)
901{
902 if (PyBool_Check(obj)) {
903 *keepdims = (obj == Py_True);
904 return NPY_SUCCEED;
905 }
906 else {
907 PyErr_SetString(PyExc_TypeError,
908 "'keepdims' must be a boolean");
909 return NPY_FAIL;
910 }
911}
912
913static int
914_wheremask_converter(PyObject *obj, PyArrayObject **wheremask)

Callers 1

convert_ufunc_argumentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected