* Converters for use in parsing of keywords arguments. */
| 883 | * Converters for use in parsing of keywords arguments. |
| 884 | */ |
| 885 | static 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 | |
| 899 | static int |
| 900 | _keepdims_converter(PyObject *obj, int *keepdims) |
no outgoing calls
no test coverage detected