[SciPy-user] Finding all combinations of numbers

David Warde-Farley dwf@cs.toronto....
Sat Jan 12 22:15:30 CST 2008


Looks like I spoke too soon: SAGE

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