I don't understand the usage of -1 in reshaping

In the first required assignment, there is this sentence :

A trick when you want to flatten a matrix X of shape (a,b,c,d) to a matrix X_flatten of shape (b∗c∗d, a) is to use:
X_flatten = X.reshape(X.shape[0], -1).T

how to use -1?

Please read about newshape here

Hi @thanaa1812 ,

Please check out this thread written by our mentor Paul M.