#17405: solve_right with matrix right hand side fails over RDF and CDF
---------------------------------+----------------------------
   Reporter:  fredrik.johansson  |            Owner:
       Type:  defect             |           Status:  new
   Priority:  minor              |        Milestone:  sage-6.5
  Component:  linear algebra     |         Keywords:
  Merged in:                     |          Authors:
  Reviewers:                     |  Report Upstream:  N/A
Work issues:                     |           Branch:
     Commit:                     |     Dependencies:
   Stopgaps:                     |
---------------------------------+----------------------------
 Solving {{{AX=B}}} for a matrix {{{B}}} using {{{solve_right}}} or {{{\}}}
 works over many rings, but not {{{RDF}}} or {{{CDF}}}. Example:

 {{{
 sage: MatrixSpace(QQ,10,10,).random_element() \
 MatrixSpace(QQ,10,1).random_element()
 [   -783/1145]
 [ 15697/18320]
 [ -4647/18320]
 [  -2599/7328]
 [ 20289/73280]
 [ -3791/18320]
 [-70107/36640]
 [-12407/36640]
 [  -1588/1145]
 [  -7059/9160]
 sage: MatrixSpace(RR,10,10,).random_element() \
 MatrixSpace(RR,10,1).random_element()
 [ 0.0620590489221758]
 [ -0.584548090301576]
 [ -0.106165379993850]
 [   1.52004291094317]
 [  -1.03573096808637]
 [ 0.0822404955372452]
 [ -0.145002162865055]
 [  0.262055581969539]
 [   1.35298542346484]
 [-0.0727293754429877]
 sage: MatrixSpace(RDF,10,10,).random_element() \
 MatrixSpace(RDF,10,1).random_element()
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 <ipython-input-16-0286e0222123> in <module>()
 ----> 1 MatrixSpace(RDF,Integer(10),Integer(10),).random_element()  *
 BackslashOperator() *
 MatrixSpace(RDF,Integer(10),Integer(1)).random_element()

 /home/fredrik/sage-6.3/local/lib/python2.7/site-
 packages/sage/misc/preparser.pyc in __mul__(self, right)
    1413             (0.0, 0.5, 1.0, 1.5, 2.0)
    1414         """
 -> 1415         return self.left._backslash_(right)
    1416
    1417

 /home/fredrik/sage-6.3/local/lib/python2.7/site-
 packages/sage/matrix/matrix2.so in sage.matrix.matrix2.Matrix._backslash_
 (build/cythonized/sage/matrix/matrix2.c:4193)()

 /home/fredrik/sage-6.3/local/lib/python2.7/site-
 packages/sage/matrix/matrix_double_dense.so in
 sage.matrix.matrix_double_dense.Matrix_double_dense.solve_right
 (build/cythonized/sage/matrix/matrix_double_dense.c:11896)()

 TypeError: vector of constants over Real Double Field incompatible with
 matrix over Real Double Field
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/17405>
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