[Numpy-discussion] offset in fill diagonal
josef.pktd at gmail.com
josef.pktd at gmail.com
Sat Jan 21 10:10:53 EST 2017
Is there a simple way to fill in diagonal elements in an array for other
than main diagonal?
As far as I can see, the diagxxx functions that have offset can only read
and not inplace modify, and the functions for modifying don't have offset
and only allow changing the main diagonal.
Usecase: creating banded matrices (2-D arrays) similar to toeplitz.
Josef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20170121/5e33e9ef/attachment.html>
More information about the NumPy-Discussion
mailing list