Skip to main content

All Questions

2 votes
1 answer
1k views

Fast brute force numpy array combination

I want to extract the combinations of numpy arrays in this way: ...
snowflake's user avatar
  • 275
4 votes
1 answer
3k views

Permutations with a sum constraint

I have made the following function that gives the combinations permuted of n elements with a constrain/rule. This consist on creating a dataframe with all combination of numbers from 0 to n that sums ...
PeCaDe's user avatar
  • 143
11 votes
2 answers
529 views

Approximate (250 over 100) permutation best fitting certain criteria

Given a list of 250 words of 4 letters each, what is the fastest way, in Python, to find a subsample of 100 words (drawn without replacement) so that the distribution of letters across the whole ...
jona's user avatar
  • 305
1 vote
1 answer
10k views

Fastest way for working with itertools.combinations

I need to speed up the function below: ...
querzy's user avatar
  • 13