[SciPy-user] Construct sparse matrix from sparse blocks

Nathan Bell wnbell at gmail.com
Fri Feb 8 16:08:30 EST 2008


On Feb 8, 2008 2:43 PM, Neilen Marais <nmarais at sun.ac.za> wrote:
> I was unaware of the bmat like interface. I simply implemented the
> interface that seemed easiest implementation wise to me. Both the bmat
> and sparse hstack/vstack interfaces sound pretty nice to me... Avoids the
> possiblity of messing up the offsets.

Very well, I'll adapt your code to provide bmat/hstack/vstack-like
functionality.

Regarding names, we already have spkron ~= kron and spdiags ~= diag.
I think we'll have to abandon this approach for the proposed functions
since spbmat, sphstack, spvstack  are terrible :)

Which is better,

  column_stack_sparse
  row_stack_sparse
  block_matrix_sparse

or

  sparse_column_stack
  sparse_row_stack
  sparse_block_matrix


I prefer the XXX_sparse format since it aids tab completion.  Suggestions?

-- 
Nathan Bell wnbell at gmail.com
http://graphics.cs.uiuc.edu/~wnbell/



More information about the SciPy-User mailing list