Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python create random matrix

# float
numpy.random.random((3, 3)) # size = 3*3

# int 
numpy.random.randint(5, size=10) # Creates sample with 0-4 as values of size 10
numpy.random.randint(10, size=(3,3)) # Creates sample with 0-9 as values of size 10
 
PREVIOUS NEXT
Tagged: #python #create #random #matrix
ADD COMMENT
Topic
Name
1+8 =