summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/src/umath/ufunc_type_resolution.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/numpy/core/src/umath/ufunc_type_resolution.c b/numpy/core/src/umath/ufunc_type_resolution.c
index 8abc6ac7c..b26870b3c 100644
--- a/numpy/core/src/umath/ufunc_type_resolution.c
+++ b/numpy/core/src/umath/ufunc_type_resolution.c
@@ -67,6 +67,9 @@ npy_casting_to_string(NPY_CASTING casting)
}
}
+/**
+ * Always returns -1 to indicate the exception was raised, for convenience
+ */
static int
raise_binary_type_reso_error(PyUFuncObject *ufunc, PyArrayObject **operands) {
PyObject *errmsg;
@@ -84,7 +87,9 @@ raise_binary_type_reso_error(PyUFuncObject *ufunc, PyArrayObject **operands) {
return -1;
}
-/** Helper function to raise UFuncNoLoopError */
+/** Helper function to raise UFuncNoLoopError
+ * Always returns -1 to indicate the exception was raised, for convenience
+ */
static int
raise_no_loop_found_error(
PyUFuncObject *ufunc, PyArray_Descr **dtypes, npy_intp n_dtypes)
@@ -157,7 +162,9 @@ raise_casting_error(
return -1;
}
-/** Helper function to raise UFuncInputCastingError */
+/** Helper function to raise UFuncInputCastingError
+ * Always returns -1 to indicate the exception was raised, for convenience
+ */
static int
raise_input_casting_error(
PyUFuncObject *ufunc,
@@ -178,7 +185,9 @@ raise_input_casting_error(
}
-/** Helper function to raise UFuncOutputCastingError */
+/** Helper function to raise UFuncOutputCastingError
+ * Always returns -1 to indicate the exception was raised, for convenience
+ */
static int
raise_output_casting_error(
PyUFuncObject *ufunc,