#10275: matrix output strangeness for cached methods
------------------------------+---------------------------------------------
   Reporter:  jhpalmieri      |          Owner:  jason, was   
       Type:  defect          |         Status:  needs_review 
   Priority:  minor           |      Milestone:  sage-4.7.3   
  Component:  linear algebra  |       Keywords:               
Work_issues:                  |       Upstream:  N/A          
   Reviewer:  Julian Rueth    |         Author:  John Palmieri
     Merged:                  |   Dependencies:               
------------------------------+---------------------------------------------
Changes (by saraedum):

  * status:  needs_work => needs_review


Old description:

> From [http://groups.google.com/group/sage-
> devel/browse_thread/thread/60ce4391e54e74be?tvc=2 sage-devel]: Something
> is not quite right in the cleverness used to output matrices:
> {{{
> sage: M
> 76 x 58 dense matrix over Integer Ring (type 'print M.str()' to see all
> of the entries)
> sage: M.hermite_form()
> 76 x 58 dense matrix over Integer Ring (type 'print hnf-True-False.str()'
> to see all of the entries)
> }}}
> This issue arises with methods which cache their results (like
> hermite_form), whereas other methods (like transpose) work the way
> they're supposed to.  The proposed fix:
>
>  - in the function {{{sage_variablename}}} which tries to get the name of
> an object, only return strings which are valid identifiers for Python
> objects.
>
>  - then in the caching methods for matrices, make sure the keys are not
> valid identifiers by appending a symbol like "$".

New description:

 From [http://groups.google.com/group/sage-
 devel/browse_thread/thread/60ce4391e54e74be?tvc=2 sage-devel]: Something
 is not quite right in the cleverness used to output matrices:
 {{{
 sage: M
 76 x 58 dense matrix over Integer Ring (type 'print M.str()' to see all of
 the entries)
 sage: M.hermite_form()
 76 x 58 dense matrix over Integer Ring (type 'print hnf-True-False.str()'
 to see all of the entries)
 }}}
 This issue arises with methods which cache their results (like
 hermite_form), whereas other methods (like transpose) work the way they're
 supposed to.  The proposed fix:

  - in the function {{{sage_variablename}}} which tries to get the name of
 an object, only return strings which are valid identifiers for Python
 objects.

  - then in the caching methods for matrices, make sure the keys are not
 valid identifiers by appending a symbol like "$".

 ----

 Apply [attachment:trac_10275_doctest.patch] to the sage repository.

--

Comment:

 Apply trac_10275_doctest.patch

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