lundi 6 avril 2020

What is the difference between test1 = np.random.randint((11, 20, 50)) and test1 = np.random.randint(11, 20, 50)

While the 1st one gives me a solution

test1 = np.random.randint((11, 20, 50))
>>> random array with order (1,3) 

ex- array([ 1, 3, 43])

While the second one gives

test1 = np.random.randint(11, 20, 50)
>>> 50 random values b/w 11 to 20 in an array

ex- array([17, 16, 14, 16, 18, 19, 19, 13, 13, 13, 14, 12, 16, 12, 16, 17, 19, 19, 12, 14, 17, 11, 19, 14, 16, 13, 17, 12, 12, 19, 14, 18, 15, 17, 11, 12, 15, 16, 13, 16, 14, 19, 12, 18, 12, 15, 13, 14, 16, 12])

So my question is why does it behave differently with only () parentheses




Aucun commentaire:

Enregistrer un commentaire