Max Alekseyev on Tue, 20 May 2025 20:53:00 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: forpart of zero and fixed length


On a related note, I do not understand why I'm getting different results in the following two examples (fist one looks like a bug):

? forpart(p=5,print(p),[0,5],[2,2])
Vecsmall([1, 4])
Vecsmall([2, 3])

? forpart(p=5,print(p),[0,5],2)
Vecsmall([0, 5])
Vecsmall([1, 4])
Vecsmall([2, 3])

Also, in the second case, shouldn't 2 be interpreted as nmax and partitions with smaller parts (=1) be also generated?

Regards,
Max


On Tue, May 20, 2025 at 2:19 PM Max Alekseyev <maxale@gmail.com> wrote:
Hello,

Similarly to

? forpart(p=1,print(p),[0,1],5)
Vecsmall([0, 0, 0, 0, 1])

I expect 
? forpart(p=0,print(p),[0,1],5)
to produce
Vecsmall([0, 0, 0, 0, 0])
but it does not.

It looks like a bug to me.

Regards,
Max