"NumPy N차원배열 ndarray"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 2개는 보이지 않습니다)
4번째 줄: 4번째 줄:


<source lang='python' run>
<source lang='python' run>
import numpy as np
x = np.array([[1, 2, 3], [4, 5, 6]], np.int32)
x = np.array([[1, 2, 3], [4, 5, 6]], np.int32)
print( type(x) ) # <type 'numpy.ndarray'>
print( type(x) ) # <class 'numpy.ndarray'>
print( x.shape ) # (2, 3)
print( x.shape ) # (2, 3)
print( x.dtype ) # dtype('int32')
print( x.dtype ) # int32
</source>
</source>



2020년 2월 15일 (토) 11:34 기준 최신판

1 개요[ | ]

NumPy N-dimensional array, ndarray
NumPy N차원 배열
import numpy as np
x = np.array([[1, 2, 3], [4, 5, 6]], np.int32)
print( type(x) ) # <class 'numpy.ndarray'>
print( x.shape ) # (2, 3)
print( x.dtype ) # int32

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}