Skip to content

Got wrong results(miss many combinations) when using 3-wise and higher #12

@quzizii

Description

@quzizii

Allpairspy is a very useful tool, thank you for your contribution. Unfortunately I have encountered some problems during use with 3-wise (also higher wise) .
Here is the code:

from allpairspy import AllPairs
parameters = [
[1,2],
[1,2],
[1,2],
[1,2],
]
for i, pairs in enumerate(AllPairs(parameters,n=3)):
print(f"{i:2d}: {pairs}")

And here is the result:

0: [1, 1, 1, 1]
1: [2, 2, 2, 1]
2: [2, 2, 1, 2]
3: [1, 1, 2, 2]
4: [1, 1, 2, 1]

It can be clearly seen that many cases are missing in the results. For example, 1 2 * * , 2 1 * * are none included. And this is the result generated by pict:

first second third fourth
2 1 1 2
2 2 2 2
1 1 2 2
1 1 1 1
1 2 2 1
2 2 1 1
2 1 2 1
1 2 1 2

There are 8 combinations here and the result in allpairspy is only 6.
And the official example 1.2 also has the same problem. Using allpairspy can only get 27 combination results, while pict gets 80 results. Obviously pict is correct.
I want to know is there a mistake in my configuration or method when I use it? or other reasons.
Any suggestions are welcome. Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions