'How to reshape numpy array
I have tried several approach to reshape np array but I kept on getting error
#Print this shows result
print(train.shape). #(1852, 32400)
print(test.shape) #(795, 32400)
#Trying to reshape shows this error
originaldata_train = train.reshape(180,180,3)
#Error
ValueError Traceback (most recent call last)
<ipython-input-32-e6c316ba84a2> in <module>()
----> 1 originaldata_train = train.reshape(180,180,3)
ValueError: cannot reshape array of size 60004800 into shape (180,180,3)
Do I need to perform any maths to reshape the image
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
