Question about W2 Optimization Methods Programming Assignment

I have a question about Week 2 Optimization Methods Programming Assignment. There is a funciton random_mini_batches:

def random_mini_batches(X, Y, mini_batch_size = 64, seed = 0):
    ...
    shuffled_Y = Y[:, permutation].reshape((1, m))
    ...

What is the purpose of reshape there? Applying permutation doesn’t change the shape of Y.

Hello @conscell,

I think that is not necessary too.

Cheers,
Raymond

Hi @rmwkwok,
Thank you for clarifying!