로그도 로그지만

그저, 파일에 쓰고 싶었다.

그래서 찾아봤는데 없었다. 아니 못찾았다.

그래서 또 찾아봤다.

np.set_printoptions() 함수 활용하면 된단다.

이 옵션만 위에 추가하면 된다. 옵션 잘 챙겨서..

threshold 옵션 값으로 np.inf (무한)사용할수 도 있으나 처리 과정에서 오류발생할 수도 있다고 하여

api에서 말하는 sys.maxsize 사용함. 숫자로 출력 개수 지정도 가능함. 디폴트 1000.

참조 : https://numpy.org/doc/stable/reference/generated/numpy.set_printoptions.html

import sys
import numpy as np

# numpy 값. 줄임없이 모두 표시하는 옵션
np.set_printoptions(threshold=sys.maxsize)

+ Recent posts