Re: [Numpy-discussion] Assembling an array from parts

2007-04-01 Thread Kevin Jacobs <[EMAIL PROTECTED]>
I had to poke around before finding it too: bmat( [[K,G],[G.T, zeros(nc)]] ) On 4/1/07, Bill Baxter <[EMAIL PROTECTED]> wrote: What's the best way of assembling a big matrix from parts? I'm using lagrange multipliers to enforce constraints and this kind of matrix comes up a lot: [[ K, G],

[Numpy-discussion] Assembling an array from parts

2007-04-01 Thread Bill Baxter
What's the best way of assembling a big matrix from parts? I'm using lagrange multipliers to enforce constraints and this kind of matrix comes up a lot: [[ K, G], [ G.T , 0]] In matlab you can use the syntax [K G; G' zeros(nc)] In numpy I'm using vstack([ hstack([ K,G ]), hstack([ G.T,