#10837: Matrix and vector norms, condition number, over RDF/CDF
------------------------------+---------------------------------------------
   Reporter:  rbeezer         |       Owner:  jason, was
       Type:  enhancement     |      Status:  needs_info
   Priority:  minor           |   Milestone:  sage-4.7  
  Component:  linear algebra  |    Keywords:            
     Author:  Rob Beezer      |    Upstream:  N/A       
   Reviewer:                  |      Merged:            
Work_issues:                  |  
------------------------------+---------------------------------------------

Comment(by jason):

 I had some interesting failures on 4.6.1:

 {{{
 % sage -t matrix2.pyx
 Detected SAGE64 flag
 Building Sage on OS X in 64-bit mode
 sage -t  "trees/sage-4.6.1/devel/sage-main/sage/matrix/matrix2.pyx"
 **********************************************************************
 File "/Users/grout/sage-trees/sage-4.6.1/devel/sage-
 main/sage/matrix/matrix2.pyx", line 6726:
     sage: A = matrix(RR, 2, 3, [3*I,4,1-I,1,2,0])
 Exception raised:
     Traceback (most recent call last):
       File "/Users/grout/sage/local/bin/ncadoctest.py", line 1231, in
 run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File "/Users/grout/sage/local/bin/sagedoctest.py", line 38, in
 run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/Users/grout/sage/local/bin/ncadoctest.py", line 1172, in
 run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_96[11]>", line 1, in <module>
         A = matrix(RR, Integer(2), Integer(3),
 [Integer(3)*I,Integer(4),Integer(1)-I,Integer(1),Integer(2),Integer(0)])###line
 6726:
     sage: A = matrix(RR, 2, 3, [3*I,4,1-I,1,2,0])
       File "/Users/grout/sage/local/lib/python/site-
 packages/sage/matrix/constructor.py", line 666, in matrix
         return matrix_space.MatrixSpace(ring, nrows, ncols,
 sparse=sparse)(entries)
       File "/Users/grout/sage/local/lib/python/site-
 packages/sage/matrix/matrix_space.py", line 405, in __call__
         return self.matrix(entries, copy=copy, coerce=coerce, rows=rows)
       File "/Users/grout/sage/local/lib/python/site-
 packages/sage/matrix/matrix_space.py", line 1136, in matrix
         return self.__matrix_class(self, entries=x, copy=copy,
 coerce=coerce)
       File "matrix_generic_dense.pyx", line 109, in
 sage.matrix.matrix_generic_dense.Matrix_generic_dense.__init__
 (sage/matrix/matrix_generic_dense.c:2349)
         self._entries[i] = R(entries[i])
       File "parent.pyx", line 882, in
 sage.structure.parent.Parent.__call__ (sage/structure/parent.c:6462)
       File "coerce_maps.pyx", line 156, in
 sage.structure.coerce_maps.NamedConvertMap._call_
 (sage/structure/coerce_maps.c:4044)
       File "expression.pyx", line 836, in
 sage.symbolic.expression.Expression._mpfr_
 (sage/symbolic/expression.cpp:4944)
       File "expression.pyx", line 766, in
 sage.symbolic.expression.Expression._eval_self
 (sage/symbolic/expression.cpp:4712)
       File "pynac.pyx", line 1010, in sage.symbolic.pynac.py_float
 (sage/symbolic/pynac.cpp:8911)
       File "parent.pyx", line 882, in
 sage.structure.parent.Parent.__call__ (sage/structure/parent.c:6462)
       File "coerce_maps.pyx", line 156, in
 sage.structure.coerce_maps.NamedConvertMap._call_
 (sage/structure/coerce_maps.c:4044)
       File "number_field_element.pyx", line 959, in
 sage.rings.number_field.number_field_element.NumberFieldElement._mpfr_
 (sage/rings/number_field/number_field_element.cpp:8538)
     TypeError: cannot convert 3*I to real number
 **********************************************************************
 File "/Users/grout/sage-trees/sage-4.6.1/devel/sage-
 main/sage/matrix/matrix2.pyx", line 6727:
     sage: A.norm('frob')
 Expected:
     5.65685424949
 Got:
     15.8113883008
 **********************************************************************
 File "/Users/grout/sage-trees/sage-4.6.1/devel/sage-
 main/sage/matrix/matrix2.pyx", line 6729:
     sage: A.norm(2)
 Expected:
     5.47068444321
 Got:
     15.0
 **********************************************************************
 File "/Users/grout/sage-trees/sage-4.6.1/devel/sage-
 main/sage/matrix/matrix2.pyx", line 6731:
     sage: A.norm(1)
 Expected:
     6.0
 Got:
     17.0
 **********************************************************************
 File "/Users/grout/sage-trees/sage-4.6.1/devel/sage-
 main/sage/matrix/matrix2.pyx", line 6733:
     sage: A.norm(Infinity)
 Expected:
     8.41421356237
 Got:
     17.0
 **********************************************************************
 1 items had failures:
    5 of  19 in __main__.example_96
 ***Test Failed*** 5 failures.
 For whitespace errors, see the file
 /Users/grout/.sage//tmp/.doctest_matrix2.py
          [30.5 s]

 ----------------------------------------------------------------------
 The following tests failed:


         sage -t  "trees/sage-4.6.1/devel/sage-
 main/sage/matrix/matrix2.pyx"
 }}}


 It seems like there was a patch recently that addressed the next error
 (maybe merged after 4.6.1?)

 {{{
  filename, compileflags)
       File "/Users/grout/sage/local/bin/sagedoctest.py", line 38, in
 run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/Users/grout/sage/local/bin/ncadoctest.py", line 1172, in
 run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_17[29]>", line 1, in <module>
         A.is_singular()###line 667:
     sage: A.is_singular()
       File "element.pyx", line 306, in
 sage.structure.element.Element.__getattr__ (sage/structure/element.c:2666)
       File "parent.pyx", line 272, in
 sage.structure.parent.getattr_from_other_class
 (sage/structure/parent.c:2840)
       File "parent.pyx", line 170, in
 sage.structure.parent.raise_attribute_error (sage/structure/parent.c:2611)
     AttributeError:
 'sage.matrix.matrix_rational_dense.Matrix_rational_dense' object has no
 attribute 'is_singular'
 **********************************************************************
 1 items had failures:
    1 of  35 in __main__.example_17
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file
 /Users/grout/.sage//tmp/.doctest_matrix_double_dense.py
          [2.7 s]

 ----------------------------------------------------------------------
 The following tests failed:


         sage -t  "trees/sage-4.6.1/devel/sage-
 main/sage/matrix/matrix_double_dense.pyx"
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10837#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to