Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

np random list

import numpy as np
np.random.randint(2, size=10)
# array([1, 0, 0, 0, 1, 1, 0, 0, 1, 0])
np.random.randint(5, size=(2, 4))
#array([[4, 0, 2, 1],
#       [3, 2, 2, 0]])
Source by numpy.org #
 
PREVIOUS NEXT
Tagged: #np #random #list
ADD COMMENT
Topic
Name
3+2 =