+ 5

How i can make empty matrix(3×3) using numpy module of python?

4th Jul 2018, 4:50 PM
Maninder $ingh
Maninder $ingh - avatar
2 Answers
+ 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])
4th Jul 2018, 5:09 PM
Mohamed IHeb Ferjani
Mohamed IHeb Ferjani - avatar
0
slm
5th Jul 2018, 2:25 PM
Moad Idrissi
Moad Idrissi - avatar