Build a sparse matrix from sparse sub-blocks
blocks :
grid of sparse matrices with compatible shapes an entry of None implies an all-zero matrix
format : sparse format of the result (e.g. “csr”)
by default an appropriate sparse matrix format is returned. This choice is subject to change.
scipy.sparse.triu
scipy.sparse.hstack