Hi Florent, I changed this over to ClonableList, but still get the same error. Could you please have a look to see what is wrong.
Thanks, Anne ----------------------------------------------------------- sage: strongTableau([[-1, -2, -3], [3]],2,[3] ) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /Applications/sage-5.0.beta3/devel/sage-combinat/sage/combinat/posets/<ipython console> in <module>() /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.pyc in __call__(cls, *args, **options) 272 """ 273 if '__classcall_private__' in cls.__dict__: --> 274 return cls.__classcall_private__(cls, *args, **options) 275 elif hasattr(cls, "__classcall__"): 276 return cls.__classcall__(cls, *args, **options) /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/combinat/k_tableau.pyc in __classcall_private__(cls, T, k, mu) 189 if isinstance(T, cls): 190 return T --> 191 return strongTableaux(k)(T, mu) 192 193 def _repr_(self): /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7906)() /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (sage/structure/coerce_maps.c:3729)() /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (sage/structure/coerce_maps.c:3598)() /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/combinat/k_tableau.pyc in _element_constructor_(self, lst, mu) 482 if not isinstance(lst, (list, tuple)): 483 raise TypeError, "Input should be a list or tuple." --> 484 return self.element_class(self, lst, mu) 485 486 def _repr_( self ): /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.pyc in __call__(cls, *args, **options) 276 return cls.__classcall__(cls, *args, **options) 277 else: --> 278 return type.__call__(cls, *args, **options) 279 280 def __contains__(cls, x): /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/combinat/k_tableau.pyc in __init__(self, parent, T, k, mu) 153 ClonableIntArray.__init__(self, self.marked_CST()) 154 else: --> 155 sTk = strongTableaux(k) 156 tijseq = sTk.marked_CST_to_transposition_seq( T ) 157 ClonableIntArray.__init__(self, T) /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.pyc in __call__(cls, *args, **options) 272 """ 273 if '__classcall_private__' in cls.__dict__: --> 274 return cls.__classcall_private__(cls, *args, **options) 275 elif hasattr(cls, "__classcall__"): 276 return cls.__classcall__(cls, *args, **options) /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/combinat/k_tableau.pyc in __classcall_private__(cls, k) 454 455 """ --> 456 return super(strongTableaux, cls).__classcall__(cls, k) 457 458 def __init__( self, k ): /Applications/sage-5.0.beta3/local/lib/python2.7/site-packages/sage/misc/cachefunc.so in sage.misc.cachefunc.CachedFunction.__call__ (sage/misc/cachefunc.c:2396)() TypeError: unhashable type: 'list' On 2/22/12 1:24 PM, Florent Hivert wrote: > On Wed, Feb 22, 2012 at 11:45:41AM -0800, Anne Schilling wrote: >> Hi Florent, >> >> Thanks for your help to get ClonableIntArray running for linear extensions >> (through private e-mails). >> >> Now I have more problems with k_tableaux.py In this case there is an >> optional input mu=None. >> How should _element_constructor_ look like in this case? Could you have a >> look at >> trac_12250-ktableaux-as.patch >> to see what is wrong with the ClonableIntArray setup in this patch? > > I'm sorry but between FPSAC and my teaching I've no more time on Sage right > now. Are you trying to use ClonableIntArray for storing a tableau ? As the > name suggest, ClonableIntArray is only able to store lists of integers. If you > want something more complicated you should use ClonableList. > > Cheers, > > Florent -- 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.