np.random.randint to generate -1 +1 code example Example: np.random.randint to generate -1 +1 2 * np.random.randint(2, size=10) -1