I’ve been struggling in L_model_backward and need assistance.

i got this error:
IndexError: boolean index did not match indexed array along dimension 0; dimension is 1 but corresponding boolean dimension is 3

it indicates error here:

[snippet deleted by mentor]

kinda no clue how to debug this. Thank you.

The 1st parameter for the function linear_activation_backward is
dA -- post-activation gradient for current layer l

Why do you use the same value of dAL across all layers?

thank you and I understand temp variable should be used instead.