[SciPy-User] create sparse matrix from diagonal arrays

Darcoux Christine bouloumag at gmail.com
Thu Apr 10 22:00:21 EDT 2014


I would like to solve a PDE using an implicit finite volume discretization.
Since the problem is 3D, the matrix should be septadiagonal. I have
computed the 7 diagonals (for top, bottom, east, west, north south and
central point) in 7 different arrays.

Now, I would like to create a sparse matrix object from these arrays, but I
feel a little lost with the documentation of scipy.sparse.spdiags.

Help would be greatly appreciated.

Christine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20140410/9acaf56f/attachment.html>


More information about the SciPy-User mailing list