ValueError: cannot reshape array of size 30470400 into shape (50,1104,104) ValueError: cannot reshape array of size 30470400 into shape (50,1104,104) numpy numpy

ValueError: cannot reshape array of size 30470400 into shape (50,1104,104)


It seems that there is a typo, since 1104*1104*50=60940800 and you are trying to reshape to dimensions 50,1104,104. So it seems that you need to change 104 to 1104.


In Matrix terms, the number of elements always has to equal the product of the number of rows and columns. In this particular case, the condition is not matching.


data.reshape((50,1104,-1))

works for me