Re: [sage-combinat-devel] number_of_partitions and PartitionTuples

2013-11-29 Thread Nathann Cohen
Y !! > I think the deprecation message is plain wrong, and it should be > Partitions(n, length=k).cardinality(). > However, this is nowhere near the speed of the deprecated > number_of_partitions(n, k)... no idea what happened here! Well, the 'k' parameter itself has been deprecated f

Re: [sage-combinat-devel] number_of_partitions and PartitionTuples

2013-11-29 Thread Darij Grinberg
Hi Nathann, I think the deprecation message is plain wrong, and it should be Partitions(n, length=k).cardinality(). However, this is nowhere near the speed of the deprecated number_of_partitions(n, k)... no idea what happened here! Best regards, Dairj On Fri, Nov 29, 2013 at 1:13 PM, Nathann

Re: [sage-combinat-devel] Re: Wrongs results again

2013-11-29 Thread Nathann Cohen
Oh. And on top of everything, the documentation of RestrictedPartitions (a deprecated class) says that the feature it implements is *NOT* available through Partitions. So this thing has been deprecated while there was no other way to get the result. So I guess it will stay there forever,

[sage-combinat-devel] number_of_partitions and PartitionTuples

2013-11-29 Thread Nathann Cohen
Hello everybody ! Because of my previous message on this forum I am now fixing doctests in the combinat/ folder. I have a problem with the following which appears in partition.py : sage: number_of_partitions(10,2) doctest:1: DeprecationWarning: sage.combinat.number_of_partitions

[sage-combinat-devel] Re: Wrongs results again

2013-11-29 Thread Nathann Cohen
Okay, this time it did not take long. Quote from the constructor of Partitions : if 'parts_in' in kwargs: return Partitions_parts_in(n, kwargs['parts_in']) elif 'starting' in kwargs: return Partitions_starting(n, kwargs['starting'])

[sage-combinat-devel] Wrongs results again

2013-11-29 Thread Nathann Cohen
Hello guys ! 1) I wanted to review #12867, and I then noticed that the function which returns a "random word of length n on k letters" is so bad that I should be rewritten rather than fixed. sage: Words(2, 50).random_element() # Should return a binary sequence of length 50 I then began to fix i