summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-03-19 00:31:28 -0700
committerEric Wieser <wieser.eric@gmail.com>2018-03-19 00:33:19 -0700
commit79e93202034f4d2bcbbab3424f2299f306a813a2 (patch)
tree38f8e09fa4258546fe1bae81243ce396641c0fb9
parent1cda13d7d72d4f679d0829c83f3647462a8f726f (diff)
downloadpython-numpy-79e93202034f4d2bcbbab3424f2299f306a813a2.tar.gz
python-numpy-79e93202034f4d2bcbbab3424f2299f306a813a2.tar.bz2
python-numpy-79e93202034f4d2bcbbab3424f2299f306a813a2.zip
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 7b424cc74..6e1fb1ee8 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: