[SciPy-user] Finding all combinations of numbers
Sat Jan 12 22:21:26 CST 2008
Looks like I spoke too soon: SAGE apparently contains an implementation for any iterable object.
Again you'll likely need to remove the empty list.
(Apologies if a truncated version of this message appears, my hand slipped and I'm not sure I cancelled it in time)
From: Roger Herikstad <firstname.lastname@example.org>
Sent: January 12, 2008 7:46 PM
To: SciPy Users List <SciPyemail@example.com>
Subject: [SciPy-user] Finding all combinations of numbers
Hi all, I was wondering if there is a functions in scipy for generating all
possible combinations of a set of numbers? E.g [1,2,3] ->
[[1,2],[1,3],[2,3],[1,2,3]]. Basically I'm looking for a function that can
generate all unique pairs, triplets, quadruples, etc, etc. Any thoughts?
More information about the SciPy-user