My problem:
import numpy as np
import itertools
bla = list(itertools.product([0, 1], repeat=3))
[(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)]
np.random.choice(bla,size=3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mtrand.pyx", line 1122, in mtrand.RandomState.choice
ValueError: a must be 1-dimensional
Now from what I understand numpy doesn't think of the tuples as objects inside my 1-dimensional array but as another array, turning the entire thin 2 dimensional. What is the best way to fix this?