"NumPy around()"의 두 판 사이의 차이

(새 문서: ==개요== ;NumPy around() <source lang='python'> import numpy as np a = np.array([1.2, 1.5, 1.6, 2.5, 3.5, 4.5]) b = np.around(a) print( b ) # [ 1. 2. 2. 2. 4. 4.] </source>...)
 
2번째 줄: 2번째 줄:
;NumPy around()
;NumPy around()


<source lang='python'>
<source lang='python' run>
import numpy as np
import numpy as np


8번째 줄: 8번째 줄:
b = np.around(a)
b = np.around(a)
print( b )
print( b )
# [ 1.  2.  2.  2.  4.  4.]
</source>
</source>



2021년 2월 19일 (금) 21:00 판

1 개요

NumPy around()
import numpy as np

a = np.array([1.2, 1.5, 1.6, 2.5, 3.5, 4.5])
b = np.around(a)
print( b )

2 같이 보기

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