summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-03-19 18:16:46 (GMT)
committerGitHub <noreply@github.com>2018-03-19 18:16:46 (GMT)
commit517f4c0749f83488d25493ccea62b91caa03c2d6 (patch)
tree7fbca7db938a72f66e125c3df444e07549523b4d
parent646452b03f7a78fc8b30d86a6bb67b688deaa017 (diff)
parent79e93202034f4d2bcbbab3424f2299f306a813a2 (diff)
downloadpython-numpy-517f4c0749f83488d25493ccea62b91caa03c2d6.zip
python-numpy-517f4c0749f83488d25493ccea62b91caa03c2d6.tar.gz
python-numpy-517f4c0749f83488d25493ccea62b91caa03c2d6.tar.bz2
Merge pull request #10766 from eric-wieser/remove-dead-code
MAINT: Remove the unused scalarmath getters for fmod and sqrt
-rw-r--r--numpy/core/src/umath/scalarmath.c.src49
1 files changed, 0 insertions, 49 deletions
diff --git a/numpy/core/src/umath/scalarmath.c.src b/numpy/core/src/umath/scalarmath.c.src
index 7b424cc..6e1fb1e 100644
--- a/numpy/core/src/umath/scalarmath.c.src
+++ b/numpy/core/src/umath/scalarmath.c.src
@@ -274,9 +274,6 @@ static void
* #type = npy_float, npy_double, npy_longdouble#
* #c = f, , l#
*/
-static @type@ (*_basic_@name@_sqrt)(@type@);
-static @type@ (*_basic_@name@_fmod)(@type@, @type@);
-
#define @name@_ctype_add(a, b, outp) *(outp) = (a) + (b)
#define @name@_ctype_subtract(a, b, outp) *(outp) = (a) - (b)
#define @name@_ctype_multiply(a, b, outp) *(outp) = (a) * (b)
@@ -306,9 +303,6 @@ static void
/**end repeat**/
-static npy_half (*_basic_half_sqrt)(npy_half);
-static npy_half (*_basic_half_fmod)(npy_half, npy_half);
-
#define half_ctype_add(a, b, outp) *(outp) = \
npy_float_to_half(npy_half_to_float(a) + npy_half_to_float(b))
#define half_ctype_subtract(a, b, outp) *(outp) = \
@@ -1693,49 +1687,6 @@ get_functions(PyObject * mm)
_basic_clongdouble_pow = funcdata[j + 5];
Py_DECREF(obj);
- /* Get the sqrt functions */
- obj = PyObject_GetAttrString(mm, "sqrt");
- if (obj == NULL) {
- goto fail;
- }
- funcdata = ((PyUFuncObject *)obj)->data;
- signatures = ((PyUFuncObject *)obj)->types;
- /*
- * 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
- * also skip float16 copy placed before
- */
- i = 6;
- j = 3;
- while (signatures[i] != NPY_FLOAT) {
- i += 2; j++;
- }
- _basic_half_sqrt = funcdata[j - 1];
- _basic_float_sqrt = funcdata[j];
- _basic_double_sqrt = funcdata[j + 1];
- _basic_longdouble_sqrt = funcdata[j + 2];
- Py_DECREF(obj);
-
- /* Get the fmod functions */
- obj = PyObject_GetAttrString(mm, "fmod");
- if (obj == NULL) {
- goto fail;
- }
- funcdata = ((PyUFuncObject *)obj)->data;
- signatures = ((PyUFuncObject *)obj)->types;
- i = 0;
- j = 0;
- while (signatures[i] != NPY_FLOAT) {
- i += 3;
- j++;
- }
- _basic_half_fmod = funcdata[j - 1];
- _basic_float_fmod = funcdata[j];
- _basic_double_fmod = funcdata[j + 1];
- _basic_longdouble_fmod = funcdata[j + 2];
- Py_DECREF(obj);
return ret = 0;
fail: