Creating and array like
random_num = np.random.randint(10,20)
arr_rand = np.random.randint(random_num, size = (4,2))
works normally, but how do I make the minimum value a negative number? I get the two errors:
ValueError Traceback (most recent call last)
<ipython-input-207-7a3b85248cc6> in <module>
1 random_num = np.random.randint(-10,20)
----> 2 arr_rand = np.random.randint(random_num, size = (4,2))
mtrand.pyx in numpy.random.mtrand.RandomState.randint()
_bounded_integers.pyx in numpy.random._bounded_integers._rand_int32()
ValueError: low >= high
Also, they should preferrably be floats. The only other way I know how to do it is with the usual randn that generates values between 0 and 1.
10and20aren't the bounds on your random array. You're generating a random upper bound, and then generating an array of numbers between 0 (inclusive) and that random upper bound (exclusive).