| 754 | } |
| 755 | |
| 756 | static int |
| 757 | _is_tuple_of_integers(PyObject *obj) |
| 758 | { |
| 759 | int i; |
| 760 | |
| 761 | if (!PyTuple_Check(obj)) { |
| 762 | return 0; |
| 763 | } |
| 764 | for (i = 0; i < PyTuple_GET_SIZE(obj); i++) { |
| 765 | if (!PyArray_IsIntegerScalar(PyTuple_GET_ITEM(obj, i))) { |
| 766 | return 0; |
| 767 | } |
| 768 | } |
| 769 | return 1; |
| 770 | } |
| 771 | |
| 772 | /* |
| 773 | * helper function for _try_convert_from_inherit_tuple to disallow dtypes of the form |
no outgoing calls
no test coverage detected