summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-09-11 14:52:07 +0000
committerPauli Virtanen <pav@iki.fi>2010-09-11 14:52:07 +0000
commit3843e86ee3862103364b6aae2a0af8bd4ebdc986 (patch)
tree0f2906511908ec36e45cf80ce2ae247aaace08e9 /numpy
parentb74533baef2a88255e36e680f5dba5c0f9dd4f7b (diff)
downloadnumpy-3843e86ee3862103364b6aae2a0af8bd4ebdc986.tar.gz
BUG: core: fix _dotblas usage on Py3 (fixes #1609)
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_blasdot.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/numpy/core/tests/test_blasdot.py b/numpy/core/tests/test_blasdot.py
index aeaf55fbb..3c04759d5 100644
--- a/numpy/core/tests/test_blasdot.py
+++ b/numpy/core/tests/test_blasdot.py
@@ -1,5 +1,5 @@
from numpy.core import zeros, float64
-from numpy.testing import TestCase, assert_almost_equal
+from numpy.testing import dec, TestCase, assert_almost_equal, assert_
from numpy.core.multiarray import inner as inner_
DECPREC = 14
@@ -12,3 +12,17 @@ class TestInner(TestCase):
a = zeros(shape = (1, 80), dtype = float64)
p = inner_(a, a)
assert_almost_equal(p, 0, decimal = DECPREC)
+
+try:
+ import numpy.core._dotblas as _dotblas
+except ImportError:
+ _dotblas = None
+
+@dec.skipif(_dotblas is None, "Numpy is not compiled with _dotblas")
+def test_blasdot_used():
+ from numpy.core import dot, vdot, inner, alterdot, restoredot
+ assert_(dot is _dotblas.dot)
+ assert_(vdot is _dotblas.vdot)
+ assert_(inner is _dotblas.inner)
+ assert_(alterdot is _dotblas.alterdot)
+ assert_(restoredot is _dotblas.restoredot)