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

Function _subok_converter

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

* Converters for use in parsing of keywords arguments. */

Source from the content-addressed store, hash-verified

883 * Converters for use in parsing of keywords arguments.
884 */
885static int
886_subok_converter(PyObject *obj, npy_bool *subok)
887{
888 if (PyBool_Check(obj)) {
889 *subok = (obj == Py_True);
890 return NPY_SUCCEED;
891 }
892 else {
893 PyErr_SetString(PyExc_TypeError,
894 "'subok' must be a boolean");
895 return NPY_FAIL;
896 }
897}
898
899static int
900_keepdims_converter(PyObject *obj, int *keepdims)

Callers 1

convert_ufunc_argumentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected