Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy ones

import numpy
print(numpy.ones((2, 3), dtype=int))
# creates the array of the shape (2, 3) of value 1 in its each cell
print(numpy.ones(6, dtype=str) 
# creates an array of size 6 with values of '1'
 
PREVIOUS NEXT
Tagged: #numpy
ADD COMMENT
Topic
Name
4+4 =