Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
quzizii opened this issue Jul 31, 2023 · 1 comment
Open

Comments

@quzizii
Copy link

quzizii commented Jul 31, 2023

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!

@thombashi
Copy link
Owner

Thank you for your report.
That would probably be the same issue as #2 and #5
May solved by #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants