[sage-combinat-devel] Re: Reject on word_pal_complexity-sl.patch

2009-11-13 Thread Sébastien Labbé

Hi

 application de word_pal_complexity-sl.patch
 patching file sage/combinat/words/word.py
 Hunk #1 succeeded at 1264 with fuzz 2 (offset 147 lines).
 Hunk #3 FAILED at 2738
 1 out of 4 hunks FAILED -- saving rejects to file 
 sage/combinat/words/word.py.rej

 Can you please fix it or at least disable the patch. It does not bother me
 since it's very low in the queue but it is a problem for newcommers.

The patch word_pal_complexity-sl.patch depends on #7227 patches merged
in sage-4.2.1.alpha0. If you are using a version of sage 
4.2.1.alpha0, make sure to apply the 4_2_1 guard :

/sage-4.2/devel/sage-combinat$ hg qselect
4_2_1

This should fix the problem (tell me if not).

Sébastien

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en
-~--~~~~--~~--~--~---



[sage-combinat-devel] Re: Iterators demo

2009-11-13 Thread William Stein

On Fri, Nov 13, 2009 at 2:14 PM, Vincent Delecroix
20100.delecr...@gmail.com wrote:

 Hi,

 A basic example from statistics which I like for its simplicity :
 {{{
 sage: marks = [1, 4, 2, 5.65, 3, 2.28]  # the marks of my students
 sage: mean = sum(marks) / len(marks)
 sage: print mean
 2.988333
 sage: variance = sum([(mark-mean)^2 for mark in marks]) / len(marks)
 sage: print variance
 2.2566805556
 }}}

Shameless plug for a patch I have a student working on:

http://trac.sagemath.org/sage_trac/ticket/7197



 There is also a nice prod in SAGE similar to sum. It can be used as
 example for factorial :
 {{{
 sage: prod(range(1,2))
 1
 sage: prod(range(1,3))
 2
 sage: prod(range(1,4))
 6
 sage: prod(range(1,5))
 24
 }}}

 or for the smallest number dividing by primes in an interval
 {{{
 sage: prod(prime_range(1,10))
 210
 }}}

 Vincent

 




-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en
-~--~~~~--~~--~--~---