Assign shifted diagonal values with `np.fill_diagonal` and similar behaviour as `np.diag`

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Assign shifted diagonal values with `np.fill_diagonal` and similar behaviour as `np.diag`

Ivan Gonzalez
As the subject says it will be great if `np.fill_diagonal` had a k-ith diagonal argument as `np.diag` does. The behavior expected (and a hack for the solution) is better explained in the following StackOverflow questions by me: https://stackoverflow.com/questions/65299295/assign-shifted-diagonal-values-with-np-diag/65299483

I had posted an issue on numpy repo as well: https://github.com/numpy/numpy/issues/18000

Hope to hear your suggestions.

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion