#17818: Interface to FindStat
-------------------------------------+-------------------------------------
       Reporter:  mantepse           |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.7
      Component:  interfaces         |   Resolution:
       Keywords:  FindStat           |    Merged in:
        Authors:  Martin Rubey       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:  public/findstat-   |       Commit:
  interface                          |  d025f46445e6ededdbe640eea05772ade8349c61
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by stumpc5):

 I just did
 {{{
 sage: A = findstat({ S: len([B for B in S if len(B) == 1 ] ) for S in
 SetPartitions(4) },depth=0)
 sage: A.submit()
 ValueError                                Traceback (most recent call
 last)
 ...
 ValueError: too many values to unpack
 }}}

 Instead, this worked:
 {{{
 sage: def statistic(S):
     return len([B for B in S if len(B) == 1 ])

 sage: A = findstat(statistic,SetPartitions,depth=0)
 sage: A.submit()
 }}}
 It took me a few minutes to figure how to properly give a statistic in
 order to submit it -- wouldn't it be nice if the first version would also
 work, or at least give a hint on how to do it?

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