- ak.argcombinations(array, n, *, replacement=False, axis=1, fields=None, parameters=None, with_name=None, highlevel=True, behavior=None, attrs=None)#
array – Array-like data (anything
n (int) – The number of items to choose from each list:
2chooses unique pairs,
3chooses unique triples, etc.
replacement (bool) – If True, combinations that include the same item more than once are allowed; otherwise each item in a combinations is strictly unique.
axis (int) – The dimension at which this operation is applied. The outermost dimension is
0, followed by
1, etc., and negative values count backward from the innermost:
-1is the innermost dimension,
-2is the next level up, etc.
fields (None or list of str) – If None, the pairs/triples/etc. are tuples with unnamed fields; otherwise, these
fieldsname the fields. The number of
fieldsmust be equal to
attrs (None or dict) – Custom attributes for the output array, if high-level.
Computes a Cartesian product (i.e. cross product) of
array with itself
that is restricted to combinations sampled without replacement,
ak.combinations, but returning integer indexes for