numpy permutations with replacement

skorpio11 at gmail.com skorpio11 at gmail.com
Mon Apr 13 07:05:33 EDT 2009


I am trying to generate all possible permutations of length three from
elements of [0,1]. i.e in this scenario there are a total of 8
distinct permutations:

[0,0,0]
[0,0,1]
[0,1,0]
    .
    .
    .
[1,1,1]


Does numpy define a function to achieve this ?

Thanks in advance



More information about the Python-list mailing list