ones in numpy code example
Example: 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'
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'