summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/include/numpy/npy_math.h2
-rw-r--r--numpy/core/src/umath/loops.c.src1
-rw-r--r--numpy/core/tests/test_blasdot.py18
3 files changed, 10 insertions, 11 deletions
diff --git a/numpy/core/include/numpy/npy_math.h b/numpy/core/include/numpy/npy_math.h
index 625999022..537a63ee4 100644
--- a/numpy/core/include/numpy/npy_math.h
+++ b/numpy/core/include/numpy/npy_math.h
@@ -6,7 +6,7 @@ extern "C" {
#endif
#include <math.h>
-#ifdef NPY_HAVE_CONFIG_H
+#ifdef HAVE_NPY_CONFIG_H
#include <npy_config.h>
#endif
#include <numpy/npy_common.h>
diff --git a/numpy/core/src/umath/loops.c.src b/numpy/core/src/umath/loops.c.src
index 5eae448ee..687c62987 100644
--- a/numpy/core/src/umath/loops.c.src
+++ b/numpy/core/src/umath/loops.c.src
@@ -5,7 +5,6 @@
#include "Python.h"
-#include "npy_config.h"
#ifdef ENABLE_SEPARATE_COMPILATION
#define PY_ARRAY_UNIQUE_SYMBOL _npy_umathmodule_ARRAY_API
#define NO_IMPORT_ARRAY
diff --git a/numpy/core/tests/test_blasdot.py b/numpy/core/tests/test_blasdot.py
index fb215296f..2e99cf5b0 100644
--- a/numpy/core/tests/test_blasdot.py
+++ b/numpy/core/tests/test_blasdot.py
@@ -111,15 +111,15 @@ def test_dot_array_order():
dtype=arr_type, order=a_order)
assert_array_equal(np.dot(a, a), a.dot(a))
# (a.a)' = a'.a', note that mse~=1e-31 needs almost_equal
- assert_almost_equal(a.dot(a), a.T.dot(a.T).T, decimal=30)
+ assert_almost_equal(a.dot(a), a.T.dot(a.T).T, decimal=prec)
#
# Check with making explicit copy
#
a_T = a.T.copy(order=a_order)
- assert_array_equal(a_T.dot(a_T), a.T.dot(a.T))
- assert_array_equal(a.dot(a_T), a.dot(a.T))
- assert_array_equal(a_T.dot(a), a.T.dot(a))
+ assert_almost_equal(a_T.dot(a_T), a.T.dot(a.T), decimal=prec)
+ assert_almost_equal(a.dot(a_T), a.dot(a.T), decimal=prec)
+ assert_almost_equal(a_T.dot(a), a.T.dot(a), decimal=prec)
#
# Compare with multiarray dot
@@ -135,10 +135,10 @@ def test_dot_array_order():
b = np.asarray(np.random.randn(a_dim, b_dim),
dtype=arr_type, order=b_order)
b_T = b.T.copy(order=b_order)
- assert_array_equal(a_T.dot(b), a.T.dot(b))
- assert_array_equal(b_T.dot(a), b.T.dot(a))
+ assert_almost_equal(a_T.dot(b), a.T.dot(b), decimal=prec)
+ assert_almost_equal(b_T.dot(a), b.T.dot(a), decimal=prec)
# (b'.a)' = a'.b
- assert_almost_equal(b.T.dot(a), a.T.dot(b).T, decimal=30)
+ assert_almost_equal(b.T.dot(a), a.T.dot(b).T, decimal=prec)
assert_almost_equal(a.dot(b), _dot(a, b), decimal=prec)
assert_almost_equal(b.T.dot(a), _dot(b.T, a), decimal=prec)
@@ -147,7 +147,7 @@ def test_dot_array_order():
c = np.asarray(np.random.randn(b_dim, c_dim),
dtype=arr_type, order=c_order)
c_T = c.T.copy(order=c_order)
- assert_array_equal(c.T.dot(b.T), c_T.dot(b_T))
- assert_almost_equal(c.T.dot(b.T).T, b.dot(c), decimal=30)
+ assert_almost_equal(c.T.dot(b.T), c_T.dot(b_T), decimal=prec)
+ assert_almost_equal(c.T.dot(b.T).T, b.dot(c), decimal=prec)
assert_almost_equal(b.dot(c), _dot(b, c), decimal=prec)
assert_almost_equal(c.T.dot(b.T), _dot(c.T, b.T), decimal=prec)