#18979: avoid Maxima on creation of symbolic matrices
-------------------------------------+-------------------------------------
       Reporter:  rws                |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.9
      Component:  linear algebra     |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Ralf Stephan       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/rws/avoid_maxima_on_creation_of_symbolic_matrices|  
75e679c687019c9657188003306bbd08314919a5
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by rws):

 Omitting the checks however makes hundreds of doctests fail with eg...
 {{{
 Failed example:
     matrix(RR, 0, 2, []).columns()
 Exception raised:
     Traceback (most recent call last):
       File "/home/ralf/sage/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 496, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/home/ralf/sage/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 858, in compile_and_execute
         exec(compiled, globs)
       File "<doctest sage.matrix.matrix1.Matrix.columns[2]>", line 1, in
 <module>
         matrix(RR, Integer(0), Integer(2), []).columns()
       File "/home/ralf/sage/local/lib/python2.7/site-
 packages/sage/matrix/constructor.py", line 729, in _matrix_constructor
         return matrix_space.MatrixSpace(ring, nrows, ncols,
 sparse=sparse)(entries)
       File "/home/ralf/sage/local/lib/python2.7/site-
 packages/sage/matrix/matrix_space.py", line 482, in __call__
         return self.matrix(entries, coerce, copy)
       File "/home/ralf/sage/local/lib/python2.7/site-
 packages/sage/matrix/matrix_space.py", line 1334, in matrix
         return self.zero_matrix().__copy__()
       File "sage/misc/cachefunc.pyx", line 2215, in
 sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__
 (build/cythonized/sage/misc/cachefunc.c:13792)
         self.cache = f(self._instance)
       File "/home/ralf/sage/local/lib/python2.7/site-
 packages/sage/matrix/matrix_space.py", line 1185, in zero_matrix
         res = self.__matrix_class(self, 0, coerce=False, copy=False)
       File "sage/matrix/matrix_generic_dense.pyx", line 118, in
 sage.matrix.matrix_generic_dense.Matrix_generic_dense.__init__
 (build/cythonized/sage/matrix/matrix_generic_dense.c:3057)
         raise TypeError, "nonzero scalar matrix must be square"
     TypeError: nonzero scalar matrix must be square
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/18979#comment:7>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to