C5W4 get_angles

I am stuck in the very first exercise of the programming project.

In the function get_angles(pos, i, d) I get the following error:
AssertionError: Submatrices of odd and even columns must be equal

How could I solve it?

Many thanks in advance!

My code:



I have just found out that d = 16, and i range from 0 - 15. You should not use 2*i instead of i.

You should also notice that we only use i % 2 == 0.

That why odd_column equal even_column

I have the same issue. Throwing assertions, both equal and limit. Any hints?

Why is the assertion that odd & even columns must be equal? Sine and Cosine are just out of phase, and equal column-wise?

Pos: [[0]
i: [[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]]
d: 16

Even: [[0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00 0.e+00]
[1.e+00 1.e-01 1.e-02 1.e-03 1.e-04 1.e-05 1.e-06 1.e-07]
[2.e+00 2.e-01 2.e-02 2.e-03 2.e-04 2.e-05 2.e-06 2.e-07]
[3.e+00 3.e-01 3.e-02 3.e-03 3.e-04 3.e-05 3.e-06 3.e-07]]

Odd: [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[3.16227766e-01 3.16227766e-02 3.16227766e-03 3.16227766e-04
3.16227766e-05 3.16227766e-06 3.16227766e-07 3.16227766e-08]
[6.32455532e-01 6.32455532e-02 6.32455532e-03 6.32455532e-04
6.32455532e-05 6.32455532e-06 6.32455532e-07 6.32455532e-08]
[9.48683298e-01 9.48683298e-02 9.48683298e-03 9.48683298e-04
9.48683298e-05 9.48683298e-06 9.48683298e-07 9.48683298e-08]]

AssertionError: Last value must be 0.0009486832980505137

Well it’s off by 1000X?