Search
Duplicate

numpy 출력 precision 조정하기

생성자
분류
파이썬
생성일
2023/02/16 14:02
아래와 같이 출력 전에 printoption을 지정해 줄 수 있다.
np.set_printoptions(precision=8, suppress=True)
Python
복사
직접 format을 지정할 수 있다.
np.set_printoptions(formater={'float : ' lambda x : "0:0.3f".format(x)})
Python
복사