Issue
I have a NUMPY ARRAY and I reshaped it using ARRAY.reshape(1,50), which means it has only 1 row and 50 columns. But when I type ARRAY.shape, the output is (50, ). Why is that so? Isn't the output misleading? Because you get the same output for an array with 50 rows and 1 column. So why is the output same for arrays with clearly different shapes?
Image 1:
Image 2:
Solution
You change the value, but you don't catch it. You have to assign the value to a variable.
Try this: x = x.reshape(1, 50)
Answered By - JayVeeBe
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.