[Python_Error] TypeError: unsupported operand type(s) for -: 'int' and 'list'


[Python_Error] TypeError: unsupported operand type(s) for -: 'int' and 'list'

본 포스팅은 업무 중 발생했던 오류들을 예시를 통해 어떻게 해결을 했는지 적을 예정이다. TypeError: unsupported operand type(s) for -: 'int' and 'list' 본 오류는 array 내에 scalar 값이 아닌 list가 들어가서 발생한 오류이다. [예시] import numpy as np rand_cube_3D = np.random.randint(0,100,size=[3,3,3]) print(rand_cube_3D) """ array([[[87, 58, 63], [ 3, 44, 32], [81, 11, 80]], [[20, 84, 77], [56, 8, 32], [38, 99, 61]], [[71, 83, 58], [85, 29, 65], [67, 33, 70]..


원문링크 : [Python_Error] TypeError: unsupported operand type(s) for -: 'int' and 'list'