I am trying to create a numpy array of the following type:
range = 3, size = 4 => [(0,0,0,0), (0,0,0,1) .... (0,0,0,3), (0,0,1,0)........(3,3,3,3)]
currently, I have got the solution of using itertool.combination to generate the list and then convert it into numpy array.
Is there any smarter and better / faster way to implement it? especially when the range and the size number both are going up to 50?