ENH: sparse: new block_diag function added to construct #97

wants to merge 1 commit into


None yet
4 participants

dlax commented Oct 27, 2011

This function makes it possible to build a sparse block-diagonal matrix from a sequence of (sparse or dense) matrices. This is the counterpart of block_diag for dense matrices (in linalg / special_matrices). As most other functions in construct, it makes use of bmat to actually build the matrix. Test included.


pv commented Nov 12, 2011

Looks good to me, +1


WarrenWeckesser commented Nov 30, 2011

Looks good. Please add a note about the new function to the release notes, scipy/doc/release/0.11.0-notes.rst, when this is committed.


rgommers commented Dec 6, 2011

I see the "This choice is subject to change." part of the format parameter is just copied from bmat, but why is it there in the first place. Can we just document the default to be "coo? Changing that later on will break backwards compatibility, and since the user can specify the format anyway there's no point in doing that.

Proposal: document default and reason for that (implementation uses "coo" internally) for both this function and bmat.


rgommers commented Dec 28, 2011

I'll commit this and make my proposed change in a day or so unless someone objects.


WarrenWeckesser commented Dec 28, 2011

Sounds good.


rgommers commented Dec 28, 2011

OK, done.

rgommers closed this Dec 28, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment