[SciPy-user] Finding all combinations of numbers

David Warde-Farley dwf at cs.toronto.edu
Sat Jan 12 23:15:30 EST 2008


Looks like I spoke too soon: SAGE

-----Original Message-----
From: Roger Herikstad <roger.herikstad at gmail.com>
Sent: January 12, 2008 7:46 PM
To: SciPy Users List <SciPy-user at scipy.org>
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?

~ Roger




More information about the SciPy-User mailing list