Week 2 2nd program exercise 4 shaping array for np.exp

irst I found train_set_x wasn’t defined so I entered this line of the code from the cell that normalized train_set_x

31 train_set_x = train_set_x_flatten / 255 32

Then I tried to reshape rows and columns into one long column (or row?) 2 different ways

method 1:

#s=np.exp(train_set_x.reshape(train_set_x[0],-1).T)—> 33

method 2: s=np.exp(train_set_x.reshape(train_set_x[1]*train_set_x[2],1)) 34 # YOUR CODE ENDS HERE 35

I get this error
TypeError: only integer scalar arrays can be converted to a scalar index

Stumped!! Thanks

Hi Nahammond,

Thanks for your remark. This part of the board is concerned with course 4 of the DLS, while it seems your remark is concerned with course 1. Maybe you could repost there? Good luck!