import numpy as np # 1차원 배열 초기화 a = np.array( [ 1., 2.0, 3.00 ] ) b = np.zeros( (4,), int ) c = np.zeros_like( a ) # 주요 속성값 출력 print( "a = ", a.dtype, ", shape=", a.shape ) print( "b = ", b.dtype, ", shape=", b.shape ) print( "c = ", c.dtype, ", shape=", c.shape )
a = float64 , shape= (3,) b = int64 , shape= (4,) c = float64 , shape= (3,)