라벨이 matrix인 게시물 표시

How to make empty matrix with zeros without numpy in Python

이미지
We can generate empty matrix without numpy module in Python! Just do this! mat = [[0 for i in range(5)] for i in range(5)] Here is an example!

How to make a empty matrix with zeros in Python using Numpy

이미지
It is quite simple! ------------------------------- import numpy numpy.zeros([rows,cols]) ------------------------------- Here is an example!