summaryrefslogtreecommitdiff
path: root/numpy/core/src/scalarmathmodule.c.src
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/src/scalarmathmodule.c.src')
-rw-r--r--numpy/core/src/scalarmathmodule.c.src10
1 files changed, 8 insertions, 2 deletions
diff --git a/numpy/core/src/scalarmathmodule.c.src b/numpy/core/src/scalarmathmodule.c.src
index 11716dd46..0f5f195f4 100644
--- a/numpy/core/src/scalarmathmodule.c.src
+++ b/numpy/core/src/scalarmathmodule.c.src
@@ -1766,8 +1766,14 @@ get_functions(void)
}
funcdata = ((PyUFuncObject *)obj)->data;
signatures = ((PyUFuncObject *)obj)->types;
- i = 0;
- j = 0;
+ /*
+ * sqrt ufunc is specialized for double and float loops in
+ * generate_umath.py, the first to go into FLOAT/DOUBLE_sqrt
+ * they have the same signature as the scalar variants so we need to skip
+ * over them
+ */
+ i = 4;
+ j = 2;
while (signatures[i] != NPY_FLOAT) {
i += 2; j++;
}