+ 5
How i can make empty matrix(3×3) using numpy module of python?
2 Antworten
+ 5
import numpy
arr = numpy.zeros((3,3))
or
arr = numpy.array([[0,0,0],[0,0,0],[0,0,0]])
also you can try this but it fills your matrix with random numbers
arr = numpy.empty([3,3])
0
slm