One_hot_matrix error

Hi, I have implemented one_hot_matrix like this and it passed all test without any error:
def one_hot_matrix(label, depth):

[Removed solution code]

But when I got got error in this while running(PS I havent changed anything )
new_y_test =
new_y_train =
Error is
TypeError: tf__one_hot_matrix() missing 1 required positional argument: ‘depth’

Hi, @kd_nitish.

Change the function header to:

def one_hot_matrix(label, depth=6):

Do you have the latest version of the notebook? :thinking:

Good luck with the assignment :slight_smile:


Thanks, a lot sir! I edited ‘depth=6’ by ‘depth’ by mistake.

1 Like