#13555: Doctests of random functions needs to be improved.
---------------------------------------------------------------------------------------------+
       Reporter:  JoalHeagney                                                   
             |         Owner:  mvngu   
           Type:  defect                                                        
             |        Status:  new     
       Priority:  major                                                         
             |     Milestone:  sage-5.5
      Component:  doctest                                                       
             |    Resolution:          
       Keywords:  random, matrices, random_matrix, properties of random 
objects, properties  |   Work issues:          
Report Upstream:  N/A                                                           
             |     Reviewers:          
        Authors:                                                                
             |     Merged in:          
   Dependencies:                                                                
             |      Stopgaps:          
---------------------------------------------------------------------------------------------+

Comment (by JoalHeagney):

 Found a way to iterate over elements in a matrix using a generator.

 if M is a matrix, then this:

 {{{
 (M[vals[0],vals[1]] for vals in xmrange(M.dimensions()))
 }}}
 will return a generator object that does the job.

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