C1W2 assignment2 exercise2

Hello, part of the exercise mentioned in the title is using the line "
X_flatten = X.reshape(X.shape[0], -1).T" and after trying many different ways (such as the one in C1W2 assignment1 exercise5) to make the exercise work, it just does not.
can someone please explain how the transpose way works? and why the other ways do not?

Hi @Samer_Attrah ,

Here is a thread with detailed explanation on how the reshape() function works.