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