summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-08-04 12:00:34 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-08-04 12:00:34 +0000
commitce5fc0af6285ca4ed1478c42c48fd1f6a7909f83 (patch)
tree4f40ed22b168625f2739febe1134c9edbc5cb1bd
parentc3de90a4f53d23513f4295646610fe204b2cfc47 (diff)
downloadnumpy-ce5fc0af6285ca4ed1478c42c48fd1f6a7909f83.tar.gz
Add test for #844 (inner product pb with atlas).
-rw-r--r--numpy/core/tests/test_blasdot.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/numpy/core/tests/test_blasdot.py b/numpy/core/tests/test_blasdot.py
new file mode 100644
index 000000000..aeaf55fbb
--- /dev/null
+++ b/numpy/core/tests/test_blasdot.py
@@ -0,0 +1,14 @@
+from numpy.core import zeros, float64
+from numpy.testing import TestCase, assert_almost_equal
+from numpy.core.multiarray import inner as inner_
+
+DECPREC = 14
+
+class TestInner(TestCase):
+ def test_vecself(self):
+ """Ticket 844."""
+ # Inner product of a vector with itself segfaults or give meaningless
+ # result
+ a = zeros(shape = (1, 80), dtype = float64)
+ p = inner_(a, a)
+ assert_almost_equal(p, 0, decimal = DECPREC)