diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/setup.py | 5 | ||||
-rw-r--r-- | numpy/core/src/common/umathmodule.h | 8 | ||||
-rw-r--r-- | numpy/core/src/multiarray/multiarraymodule.c | 8 | ||||
-rw-r--r-- | numpy/core/src/umath/umathmodule.c | 22 |
4 files changed, 13 insertions, 30 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 891148790..b306aa4e8 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -725,6 +725,7 @@ def configuration(parent_package='',top_path=None): join('src', 'common', 'templ_common.h.src'), join('src', 'common', 'ucsnarrow.h'), join('src', 'common', 'ufunc_override.h'), + join('src', 'common', 'umathmodule.h'), ] common_src = [ @@ -742,8 +743,8 @@ def configuration(parent_package='',top_path=None): # These files are also in MANIFEST.in so that they are always in # the source distribution independently of HAVE_CBLAS. common_src.extend([join('src', 'common', 'cblasfuncs.c'), - join('src', 'common', 'python_xerbla.c'), - ]) + join('src', 'common', 'python_xerbla.c'), + ]) if uses_accelerate_framework(blas_info): common_src.extend(get_sgemv_fix()) else: diff --git a/numpy/core/src/common/umathmodule.h b/numpy/core/src/common/umathmodule.h new file mode 100644 index 000000000..6998596ee --- /dev/null +++ b/numpy/core/src/common/umathmodule.h @@ -0,0 +1,8 @@ +#include "__umath_generated.c" +#include "__ufunc_api.c" + +PyObject * add_newdoc_ufunc(PyObject *NPY_UNUSED(dummy), PyObject *args); +PyObject * ufunc_frompyfunc(PyObject *NPY_UNUSED(dummy), PyObject *args, PyObject *NPY_UNUSED(kwds)); +int initumath(PyObject *m); + + diff --git a/numpy/core/src/multiarray/multiarraymodule.c b/numpy/core/src/multiarray/multiarraymodule.c index 4f216f25c..8f782cff6 100644 --- a/numpy/core/src/multiarray/multiarraymodule.c +++ b/numpy/core/src/multiarray/multiarraymodule.c @@ -73,8 +73,7 @@ NPY_NO_EXPORT int NPY_NUMUSERTYPES = 0; */ #include "funcs.inc" #include "loops.h" -#include "__umath_generated.c" -#include "__ufunc_api.c" +#include "umathmodule.h" NPY_NO_EXPORT int initscalarmath(PyObject *); @@ -4193,11 +4192,6 @@ normalize_axis_index(PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwds) return PyInt_FromLong(axis); } -/* declarations from umathmodule.c */ -PyObject * add_newdoc_ufunc(PyObject *NPY_UNUSED(dummy), PyObject *args); -PyObject * ufunc_frompyfunc(PyObject *NPY_UNUSED(dummy), PyObject *args, PyObject *NPY_UNUSED(kwds)); -int initumath(PyObject *m); - static struct PyMethodDef array_module_methods[] = { {"_get_ndarray_c_version", (PyCFunction)array__get_ndarray_c_version, diff --git a/numpy/core/src/umath/umathmodule.c b/numpy/core/src/umath/umathmodule.c index e15ce58ba..945b11fe7 100644 --- a/numpy/core/src/umath/umathmodule.c +++ b/numpy/core/src/umath/umathmodule.c @@ -256,27 +256,7 @@ intern_strings(void) npy_um_str_array_wrap && npy_um_str_array_finalize && npy_um_str_ufunc; } -/* Setup the umath module */ -/* Remove for time being, it is declared in __ufunc_api.h */ -/*static PyTypeObject PyUFunc_Type;*/ -/* -static struct PyMethodDef methods[] = { - {"frompyfunc", - (PyCFunction) ufunc_frompyfunc, - METH_VARARGS | METH_KEYWORDS, NULL}, - {"seterrobj", - (PyCFunction) ufunc_seterr, - METH_VARARGS, NULL}, - {"geterrobj", - (PyCFunction) ufunc_geterr, - METH_VARARGS, NULL}, - {"_add_newdoc_ufunc", (PyCFunction)add_newdoc_ufunc, - METH_VARARGS, NULL}, - {NULL, NULL, 0, NULL} -}; -*/ - -#include <stdio.h> +/* Setup the umath part of the module */ int initumath(PyObject *m) { |