import numpy as np
a = np.array([0.75, 0.5, 0.21])
one_list = [1] * 3
L_vec = np.diag(one_list)
L_vec[1,0] = a[0]
print(L_vec)
Expected Result:
[[1,0,0],[0.75,1,0],[0,0,1]]
Actual Result:
[[1 0 0]
[0 1 0]
[0 0 1]]
this is the result I got. I have no idea why.