[Python_Error] ValueError: all the input arrays must have same number of dimensions (np.concatenate 오류)


[Python_Error] ValueError: all the input arrays must have same number of dimensions (np.concatenate 오류)

본 포스팅은 업무 중 발생했던 오류들을 예시를 통해 어떻게 해결을 하는지 작성했다. ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 3 dimension(s) and the array at index 1 has 4 dimension(s) 해당 오류는 np.concatenate()을 사용할때 발생했던 오류이며, 특히 3차원 이상의 어레이들을 concat할때 많이 보이는 오류이다. 특히 2차원 이미지에 배치, 채널이 포함된 데이터의 경우 자주 발생했다. [예시_1] 다음과 같이 np.concatenate는 사용할 때 특정 축을 기준으로 결합이 되기 때문에 axis 인자에 입력한 특..


원문링크 : [Python_Error] ValueError: all the input arrays must have same number of dimensions (np.concatenate 오류)