Hello @zac_builta!
Interesting question. But first, understand that there is no typo in the assignment.
Now let’s discuss your query one-by-one.
Before starting, let’s understand some Python stuff. Here, [:,:n_a] means that select all the rows and columns from start to n_a.
For example, if we have a matrix M
with shape (3, 5)
and n_a=3
, M[:, :n_a]
will extract the submatrix containing all rows and the first three columns of M
, which will be a matrix with shape (3, 3)
.
Similarly, [:,n_a:] means that select all the rows but all columns starting from the n_a
-th column until the end.
For example, if we have a matrix M
with shape (3, 5)
and n_a=2
, M[:, n_a:]
will extract the submatrix containing all rows and columns from the third to the fifth column of M
, which will be a matrix with shape (3, 3)
.
So, is it make sense or not? All rows but only the first n_a columns…
This means that you select all rows but only one column, the n_a^{th} column. Got it?
Yes, the equations are the same but we have to choose different columns in both. In da_prev
, we have to choose the columns from start to n_a while in dxt
, we have to choose columns from n_a to end. Is it make sense to you or not?
If you still have any doubts, feel free to ask.
Best,
Saif.