#17108: IncidenceStructure.degree(set={1,2,3})
-------------------------------------+-------------------------------------
       Reporter:  ncohen             |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  combinatorial      |   Resolution:
  designs                            |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  Nathann Cohen      |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  527bbc11155bc54479f53532d82ed7f774dfc829
  u/vdelecroix/17108                 |     Stopgaps:
   Dependencies:  #17104             |
-------------------------------------+-------------------------------------
Changes (by vdelecroix):

 * commit:  f4f8dd6ee1c6ad08385cd1e0d00d2457cade86a4 =>
     527bbc11155bc54479f53532d82ed7f774dfc829
 * branch:  u/ncohen/17108 => u/vdelecroix/17108


Comment:

 Hi,

 Thanks for the modification. Looks like almost perfect ;-)

 Beyond docs, I added the following change in my commit

 Python is cool:
 {{{
 sage: sum([True])
 1
 sage: sum([True,False,False,True,False])
 2
 }}}
 So instead of `sum(1 for x in X if condition(x))` one can write
 `sum(condition(x) for x in X)`.

 I do not think we care here, but it has incidence
 {{{
 sage: l = [choice([True,False]) for _ in range(10000)]
 sage: %timeit sum(l)
 1000 loops, best of 3: 147 µs per loop
 sage: %timeit sum(i for i in l)
 1000 loops, best of 3: 497 µs per loop
 sage: %timeit sum(1 for i in l if i)
 1000 loops, best of 3: 826 µs per loop
 }}}

 I let Dima make more comments but on my side it would be ok to give
 positive review.

 Vincent
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=527bbc11155bc54479f53532d82ed7f774dfc829
 527bbc1]||{{{trac #17108: doc and sums}}}||

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