-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Syntax:
np.diag(v, k=0)
Arguments:
v: 1D array (to form diagonal) or 2D matrix.
k: Diagonal shift.
Example:
diag_matrix = np.diag([1, 2, 3])
[[1 0 0]
[0 2 0]
[0 0 3]]
diag_shifted = np.diag([4, 5, 6], k=1)
[[0 4 0 0]
[0 0 5 0]
[0 0 0 6]
[0 0 0 0]]
Note: we cant solve this issue rn we need help to take arguments like this -p.diag([4, 5, 6], k=1)
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed