import numpy as np
import random as rd
np.random.randint(0, 10)
rd.randint(0,10)
Randint when using Numpy is 0 ~ 9 in the above case
When using Random, randint is 0 ~ 10 in the above case.
Numpy`` numpy.random.randint (a, b) -> ʻa to b-1 Random`` random.randint (a, b) `->'a to b'
Numpy is the same asrange (a, b), so it didn't feel strange,
I was surprised at this specification because I used to use Random a lot at the beginning.
Recommended Posts