Meaning of .reshape()

what is the meaning of .reshape(( -1 , )) .i want to know what is the meaning of -1 here

Hey,
-1 in reshape means it will automatically figure out what should be the value here.
For eg. if you have a matrix of shape (4,5) and you want to flatten it into shape (20,)
one way is to use X.reshape((20,)) or you just use X.reshape((-1,)) It will automatically figure out what should be the number here.
One more example if you want to convert the same matrix into shape (2,5) you can also use X.reshape((2,-1)) -1 will be replaced by 5 automatically.

Thanks :slight_smile: