* Check whether the gufunc can be used with axis, i.e., that there is only * a single, shared core dimension (which means that operands either have * that dimension, or have no core dimensions). Returns 0 if all is fine, * and sets an error and returns -1 if not. */
| 1756 | * and sets an error and returns -1 if not. |
| 1757 | */ |
| 1758 | static int |
| 1759 | _check_axis_support(PyUFuncObject *ufunc) { |
| 1760 | if (ufunc->core_num_dim_ix != 1) { |
| 1761 | PyErr_Format(PyExc_TypeError, |
| 1762 | "%s: axis can only be used with a single shared core " |
| 1763 | "dimension, not with the %d distinct ones implied by " |
| 1764 | "signature %s.", |
| 1765 | ufunc_get_name_cstr(ufunc), |
| 1766 | ufunc->core_num_dim_ix, |
| 1767 | ufunc->core_signature); |
| 1768 | return -1; |
| 1769 | } |
| 1770 | return 0; |
| 1771 | } |
| 1772 | |
| 1773 | /* |
| 1774 | * Check whether the gufunc can be used with keepdims, i.e., that all its |
no test coverage detected