#17124: Matrix constructor broken for symmetric function rings and 1-column
matrices
------------------------------------------------+------------------------
       Reporter:  darij                         |        Owner:
           Type:  defect                        |       Status:  new
       Priority:  major                         |    Milestone:  sage-6.4
      Component:  linear algebra                |   Resolution:
       Keywords:  matrix, symmetric functions,  |    Merged in:
        Authors:                                |    Reviewers:
Report Upstream:  N/A                           |  Work issues:
         Branch:                                |       Commit:
   Dependencies:                                |     Stopgaps:
------------------------------------------------+------------------------

Comment (by darij):

 It's not in the {{{matrix}}} constructor, but in the less frontendish
 {{{MatrixSpace}}} init:

 {{{
 sage: MatrixSpace(h, 1, 1)
 Full MatrixSpace of 1 by 1 dense matrices over Symmetric Functions over
 Rational Field in the homogeneous basis
 sage: MatrixSpace(h, 1, 1)([h[1]])
 ---------------------------------------------------------------------------
 AttributeError                            Traceback (most recent call
 last)
 <ipython-input-6-d7504c152076> in <module>()
 ----> 1 MatrixSpace(h, Integer(1), Integer(1))([h[Integer(1)]])

 /home/darij/sage-6.3.beta6/local/lib/python2.7/site-
 packages/sage/matrix/matrix_space.pyc in __call__(self, entries, coerce,
 copy, sparse)
     468             Full MatrixSpace of 3 by 5 dense matrices over Integer
 Ring!
     469         """
 --> 470         return self.matrix(entries, coerce, copy)
     471
     472     def change_ring(self, R):

 /home/darij/sage-6.3.beta6/local/lib/python2.7/site-
 packages/sage/matrix/matrix_space.pyc in matrix(self, x, coerce, copy)
    1358                                       copy=False, coerce=coerce)
    1359                         else:
 -> 1360                             return MC(self, new_x, copy=False,
 coerce=coerce)
    1361                     except TypeError:
    1362                         pass

 /home/darij/sage-6.3.beta6/local/lib/python2.7/site-
 packages/sage/matrix/matrix_generic_dense.so in
 sage.matrix.matrix_generic_dense.Matrix_generic_dense.__init__
 (build/cythonized/sage/matrix/matrix_generic_dense.c:2850)()

 /home/darij/sage-6.3.beta6/local/lib/python2.7/site-
 packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__
 (build/cythonized/sage/structure/parent.c:9603)()

 /home/darij/sage-6.3.beta6/local/lib/python2.7/site-
 packages/sage/structure/coerce_maps.so in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 (build/cythonized/sage/structure/coerce_maps.c:4256)()

 /home/darij/sage-6.3.beta6/local/lib/python2.7/site-
 packages/sage/structure/coerce_maps.so in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 (build/cythonized/sage/structure/coerce_maps.c:4163)()

 /home/darij/sage-6.3.beta6/local/lib/python2.7/site-
 packages/sage/combinat/sf/classical.pyc in _element_constructor_(self, x)
     299         # Elements of the base ring #
     300         #############################
 --> 301         elif x.parent() is R:
     302             return eclass(self,
 {sage.combinat.partition.Partition([]):x})
     303

 AttributeError: 'tuple' object has no attribute 'parent'
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/17124#comment:1>
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