#12946: Bug in Compositions
------------------------------+---------------------------------------------
   Reporter:  chrisjamesberg  |             Owner:  tbd         
       Type:  defect          |            Status:  new         
   Priority:  minor           |         Milestone:  sage-5.1    
  Component:  PLEASE CHANGE   |          Keywords:  Compositions
Work issues:                  |   Report Upstream:  N/A         
  Reviewers:                  |           Authors:  Chris Berg  
  Merged in:                  |      Dependencies:              
   Stopgaps:                  |  
------------------------------+---------------------------------------------
 When using the optional 'outer' argument, Compositions gives a bug if
 'outer' is itself a composition (as opposed to a list). Also needs to be
 fixed for 'inner'.

 For instance:

 sage: c = Compositions(3, outer = Composition([3,2]))

 sage: for x in c:
 ....:     print x
 ....:
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /Applications/sage/devel/sage-combinat/.hg/patches/<ipython console> in
 <module>()

 /Applications/sage/local/lib/python2.7/site-
 packages/sage/combinat/integer_list.pyc in __iter__(self)
    1023         args = self.build_args()
    1024         for n in self.n_range:
 -> 1025             l =  first(n, *args)
    1026             while l is not None:
    1027                 yield self._element_constructor_(l)

 /Applications/sage/local/lib/python2.7/site-
 packages/sage/combinat/integer_list.pyc in first(n, min_length,
 max_length, floor, ceiling, min_slope, max_slope)
      72             return None
      73
 ---> 74         if ceiling(min_length) == 0 and max_slope <= 0:
      75             return None
      76

 /Applications/sage/local/lib/python2.7/site-
 packages/sage/combinat/integer_list.pyc in <lambda>(i)
     994         """
     995         return [self.min_length, self.max_length,
 --> 996                 lambda i: self.floor(i-1), lambda i:
 self.ceiling(i-1),
     997                 self.min_slope, self.max_slope]
     998

 TypeError: 'Composition_class' object is not callable

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12946>
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