Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is there a bug with the "parts" input in VectorPartitions?

Using Sagemath 10.1 if I run the code:

VectorPartitions([2,2], parts=[[0,1],[1,1],[1,0]]).list()

I get the answer [[[0, 1], [0, 1], [1, 0], [1, 0]], [[0, 1], [1, 0], [1, 1]], [[1, 1], [1, 1]]], as excepted. However, if I run

VectorPartitions([2,2], parts=[[1,1],[1,0],[0,1]]).list()

I get the answer []. And it gets worse; running

VectorPartitions([2,2], parts=[[1,0],[0,1],[1,1]]).list()

yields [[[1, 1], [1, 1]]]. I could go on, but I think you get the point.

Either I have absolutely no idea what the parts input is supposed to do or there is a bug here. So I guess my question is twofold: is there a bug and, if so, is there a reasonable workaround in the meantime?

click to hide/show revision 2
retagged

Is there a bug with the "parts" input in VectorPartitions?

Using Sagemath 10.1 if I run the code:

VectorPartitions([2,2], parts=[[0,1],[1,1],[1,0]]).list()

I get the answer [[[0, 1], [0, 1], [1, 0], [1, 0]], [[0, 1], [1, 0], [1, 1]], [[1, 1], [1, 1]]], as excepted. However, if I run

VectorPartitions([2,2], parts=[[1,1],[1,0],[0,1]]).list()

I get the answer []. And it gets worse; running

VectorPartitions([2,2], parts=[[1,0],[0,1],[1,1]]).list()

yields [[[1, 1], [1, 1]]]. I could go on, but I think you get the point.

Either I have absolutely no idea what the parts input is supposed to do or there is a bug here. So I guess my question is twofold: is there a bug and, if so, is there a reasonable workaround in the meantime?