only integer scalar arrays can be converted to a scalar index

boingboing·2023년 9월 14일
0
 x_reshape = x.reshape(x, (x.shape[0], -1)) # 10, 2, 3 -> 10, 6 

해결

  • reshape할 배열 쓰는건 np.reshape 쓸 때.
  • x.reshape 이렇게 쓸 때는 -> shape만
x_reshape = np.reshape(x, (x.shape[0], -1))

x_reshape = x.reshape(x.shape[0], -1)

0개의 댓글