https://numpy.org/doc/stable/reference/generated/numpy.zeros.html
numpy.zeros — NumPy v1.26 Manual
Reference object to allow the creation of arrays which are not NumPy arrays. If an array-like passed in as like supports the __array_function__ protocol, the result will be defined by it. In this case, it ensures the creation of an array object compatible
numpy.org
사용법
numpy.zeros(shape, dtype=float, order='C', *, like=None)
자주 사용하는 파라미터
shape : int 형이나, int로 이루어진 tuple
dtype : 데이터 타입 지정, ex) np.int8, np.float64
출력
주어진 shape을 가지고 0으로 채워진 어레이 리턴
shape = (2, 3)
a = np.zeros(shape, dtype=np.int8)
print(a)
[[0 0 0]
[0 0 0]]
print(a.dtype)
int8