[Numpy-svn] r5603 - trunk/numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Mon Aug 4 07:00:39 CDT 2008


Author: cdavid
Date: 2008-08-04 07:00:34 -0500 (Mon, 04 Aug 2008)
New Revision: 5603

Added:
   trunk/numpy/core/tests/test_blasdot.py
Log:
Add test for #844 (inner product pb with atlas).

Added: trunk/numpy/core/tests/test_blasdot.py
===================================================================
--- trunk/numpy/core/tests/test_blasdot.py	2008-08-03 23:45:49 UTC (rev 5602)
+++ trunk/numpy/core/tests/test_blasdot.py	2008-08-04 12:00:34 UTC (rev 5603)
@@ -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)



More information about the Numpy-svn mailing list