NUMPY_API * Convert an object to true / false */
| 425 | * Convert an object to true / false |
| 426 | */ |
| 427 | NPY_NO_EXPORT int |
| 428 | PyArray_BoolConverter(PyObject *object, npy_bool *val) |
| 429 | { |
| 430 | if (PyObject_IsTrue(object)) { |
| 431 | *val = NPY_TRUE; |
| 432 | } |
| 433 | else { |
| 434 | *val = NPY_FALSE; |
| 435 | } |
| 436 | if (PyErr_Occurred()) { |
| 437 | return NPY_FAIL; |
| 438 | } |
| 439 | return NPY_SUCCEED; |
| 440 | } |
| 441 | |
| 442 | static int |
| 443 | string_converter_helper( |
no outgoing calls
no test coverage detected