감동, 마음이 움직이는 것
[python] array with the initial value np.full() 본문
Tips (Utility, Computer Language, and etc.)
[python] array with the initial value np.full()
Struggler J. 2017. 8. 16. 03:31[Ref] https://stackoverflow.com/questions/5891410/numpy-array-initialization-fill-with-identical-values
>>> np.full((3, 5), 7)
array([[ 7., 7., 7., 7., 7.],
[ 7., 7., 7., 7., 7.],
[ 7., 7., 7., 7., 7.]])
>>> np.full((3, 5), 7, dtype=int)
array([[7, 7, 7, 7, 7],
[7, 7, 7, 7, 7],
[7, 7, 7, 7, 7]])
'Tips (Utility, Computer Language, and etc.)' 카테고리의 다른 글
[python] mean and std (0) | 2017.08.18 |
---|---|
[python] list에 있는 str내용을 합쳐서 str으로 만들 때: "".join() (0) | 2017.08.16 |
[Python] count file numbers in the folder (0) | 2017.08.16 |
[infographics] useful sites (0) | 2017.08.13 |
[gnuplot] splot과 plot을 동시에 사용하기2 (with and without dgrid3d) (0) | 2017.08.11 |