소스 뷰어
import numpy as np
a = np.array( [ [1, 2, 3 ], [4, 5, 6] ] )
print( "a =", a, sep="\n")
print( "a.dtype =", a.dtype ) # 행렬 데이터 타입
print( "a.shape =", a.shape ) # 행렬 구조
print( "-"*40 )
b = np.zeros( (3, 2) ) # 렬 갯수 3, 행 갯수 2의 행렬 생성
print( "np.zeros( (3, 2) )", b, sep="\n")
print( "b.dtype =", b.dtype ) # 행렬 데이터 타입
print( "b.shape =", b.shape ) # 행렬 구조
print( "-"*40 )
c = np.ones( (3, 2) ) # 렬 갯수 3, 행 갯수 2의 행렬 생성
print( "np.ones( (3, 2) )", c, sep="\n")
print( "c.dtype =", c.dtype ) # 행렬 데이터 타입
print( "c.shape =", c.shape ) # 행렬 구조