[TIL] 넘파이 numpy reshape, flatten
강의 https://www.boostcourse.org/ai100 를 수강하며 배운 내용을 정리한 글입니다. reshape- Array의 shape의 크기를 변경함, element의 갯수는 동일import numpy as np# (2, 4)test_matrix = [[1, 2, 3, 4], [1, 2, 5, 8]]np.array(test_matrix).shape# reshapenp.array(test_matrix).reshape(8,)# (8,)np.array(test_matrix).reshape(8,) 2 by 2 였는데 한줄로 바뀜 shape # 1번np.array(test_matrix).reshape(2, 4).shape # (2, 4)# 2번np.array(test_matrix).reshape(-..