IndentationError: unexpected indent

I am getting an Indentation problem below

initialize “a” and “y_pred” with zeros (≈2 lines)

 a = np.zeros((n_a, m, T_x))
y_pred = np.zeros((n_y, m, T_x))

====== here is the error I am getting ======
File “”, line 34
a = np.zeros((n_a, m, T_x))
^
IndentationError: unexpected indent

1 Like

It’s an indentation error in case you don’t know what is indentation:

Indentation in programming refers to the spaces or tabs at the beginning of a line of code.

So remove the space at the beginning in

To make it at same level

Regards,
Jamal

2 Likes

Thank you so much Jamal. It works!, however, now it is showing the error somewhere else. I do not why the compiler can not take care of these formats.

1 Like

The Python language uses indentation to identify blocks of code. It’s how the language is defined.

So you have to be precise in how you indent your code.

2 Likes