#9623: interacts for high school level education
-----------------------------------------------------------------------------------+
    Reporter:  schilly                                                          
   |         Owner:  itolkov, jason                                             
     
        Type:  enhancement                                                      
   |        Status:  closed                                                     
     
    Priority:  major                                                            
   |     Milestone:  sage-4.7.1                                                 
     
   Component:  interact                                                         
   |    Resolution:  fixed                                                      
     
    Keywords:                                                                   
   |   Work_issues:                                                             
     
    Upstream:  N/A                                                              
   |      Reviewer:  Jason Grout, Karl-Dieter Crisman, John Thurber, Marshall 
Hampton
      Author:  Lauri Ruotsalainen, Harald Schilly, Robert Marik, Marshall 
Hampton  |        Merged:  sage-4.7.1.alpha0                                    
           
Dependencies:                                                                   
   |  
-----------------------------------------------------------------------------------+

Comment(by jhpalmieri):

 A question for anyone who contributed to this ticket: the file
 `library_cython.pyx` has this code in it:
 {{{
 cpdef cellular(rule, int N):
     '''
     Cythonized helper function for the callular_automata fractal.
     Yields a matrix showing the evolution of a Wolfram's cellular
 automaton.
     Based on work by Pablo Angulo.
     http://wiki.sagemath.org/interact/misc#CellularAutomata

     INPUT:

         - `rule` -- determines how a cell's value is updated, depending on
 its neighbors
         - `N` -- number of iterations

     TESTS::

         sage: from sage.interacts.library_cython import cellular
         sage: rule = [1, 0, 1, 0, 0, 1, 1, 0]
         sage: N = 3
         sage: print cellular(rule, 3)

     '''
 }}}
 Note that the output from the last line of the doctest is missing.  Since
 the docstring is enclosed in triple single quotes instead of triple double
 quotes, doctesting skipped this altogether.  At #8708, there is a patch
 which will now run doctests within triple single quotes, in which case
 this file has one failure.

 So the question is: what is the output supposed to be?  When I run this
 command, I get
 {{{
         sage: print cellular(rule, 3)
         [[0 0 0 1 0 0 0]
          [0 0 0 1 0 0 0]
          [0 1 0 1 0 1 0]]
 }}}
 Is this right?  I don't know what the mathematics here is trying to do, so
 I really have no idea...

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