summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/src/npymath/ieee754.c7
-rw-r--r--numpy/core/src/npymath/npy_math.c.src7
-rw-r--r--numpy/core/src/npymath/npy_math_common.h8
-rw-r--r--numpy/core/src/npymath/npy_math_complex.c.src8
-rw-r--r--numpy/core/src/npymath/npy_math_private.h3
5 files changed, 12 insertions, 21 deletions
diff --git a/numpy/core/src/npymath/ieee754.c b/numpy/core/src/npymath/ieee754.c
index 833581eb5..902e8919b 100644
--- a/numpy/core/src/npymath/ieee754.c
+++ b/numpy/core/src/npymath/ieee754.c
@@ -1,12 +1,7 @@
/*
* Low-level routines related to IEEE-754 format
*/
-#include <Python.h>
-#include <math.h>
-
-#include "npy_config.h"
-#include "numpy/npy_math.h"
-
+#include "npy_math_common.h"
#include "npy_math_private.h"
#ifndef HAVE_COPYSIGN
diff --git a/numpy/core/src/npymath/npy_math.c.src b/numpy/core/src/npymath/npy_math.c.src
index 951668fbb..33c8c0a01 100644
--- a/numpy/core/src/npymath/npy_math.c.src
+++ b/numpy/core/src/npymath/npy_math.c.src
@@ -53,13 +53,6 @@
* is preserved.
* ====================================================
*/
-
-#include <Python.h>
-#include <math.h>
-
-#include "npy_config.h"
-#include "numpy/npy_math.h"
-
#include "npy_math_private.h"
/*
diff --git a/numpy/core/src/npymath/npy_math_common.h b/numpy/core/src/npymath/npy_math_common.h
new file mode 100644
index 000000000..0705ea323
--- /dev/null
+++ b/numpy/core/src/npymath/npy_math_common.h
@@ -0,0 +1,8 @@
+/*
+ * Common headers needed by every npy math compilation unit
+ */
+#include <Python.h>
+#include <math.h>
+
+#include "npy_config.h"
+#include "numpy/npy_math.h"
diff --git a/numpy/core/src/npymath/npy_math_complex.c.src b/numpy/core/src/npymath/npy_math_complex.c.src
index a01d6070a..583328782 100644
--- a/numpy/core/src/npymath/npy_math_complex.c.src
+++ b/numpy/core/src/npymath/npy_math_complex.c.src
@@ -28,13 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#include <Python.h>
-#include <math.h>
-#include <float.h>
-
-#include "config.h"
-#include "numpy/npy_math.h"
-
+#include "npy_math_common.h"
#include "npy_math_private.h"
/*==========================================================
diff --git a/numpy/core/src/npymath/npy_math_private.h b/numpy/core/src/npymath/npy_math_private.h
index b0612460c..57055e60f 100644
--- a/numpy/core/src/npymath/npy_math_private.h
+++ b/numpy/core/src/npymath/npy_math_private.h
@@ -21,8 +21,9 @@
#include <Python.h>
#include <math.h>
-#include "config.h"
+#include "npy_config.h"
#include "numpy/npy_math.h"
+#include "numpy/npy_cpu.h"
#include "numpy/npy_endian.h"
#include "numpy/npy_common.h"