[Numpy-svn] r5604 - branches/1.1.x/numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Mon Aug 4 07:09:59 CDT 2008


Author: cdavid
Date: 2008-08-04 07:09:54 -0500 (Mon, 04 Aug 2008)
New Revision: 5604

Added:
   branches/1.1.x/numpy/core/tests/test_blasdot.py
Log:
Add regression test for #844.

Added: branches/1.1.x/numpy/core/tests/test_blasdot.py
===================================================================
--- branches/1.1.x/numpy/core/tests/test_blasdot.py	2008-08-04 12:00:34 UTC (rev 5603)
+++ branches/1.1.x/numpy/core/tests/test_blasdot.py	2008-08-04 12:09:54 UTC (rev 5604)
@@ -0,0 +1,17 @@
+from numpy.core import zeros, float64
+from numpy.testing import NumpyTestCase, assert_almost_equal, NumpyTest
+from numpy.core.multiarray import inner as inner_
+
+DECPREC = 14
+
+class TestDot(NumpyTestCase):
+    def test_vecself(self):
+        """Ticket 844: dotblas pb """
+        # 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)
+
+if __name__ == "__main__":
+    NumpyTest().run()



More information about the Numpy-svn mailing list