[SciPy-user] Easy way to make a block diagonal matrix?
Wed May 20 17:47:07 CDT 2009
Well that's a good point; I didn't even notice he wanted three
different matrices, I just latched on to 'block diagonal'; I guess
I've only ever used kron type functions for doing block matrices with
the same matrix at each block entry:
Like you'd get with a multi-dimensional finite difference
discretization. Just curious, what sort of application would give you
different matrix blocks on the diagonal?
2009/5/20 Stéfan van der Walt <email@example.com>:
> 2009/5/20 Joshua Stults <firstname.lastname@example.org>:
>> Probably numpy.kron() already provides this functionality plus easily
>> generating more general block matrices:
> numpy.kron takes two arrays as input, so I'm not sure how that could
> work, especially for diagonal blocks with varying shapes? Would you
> use object arrays? Could be that my brain has gone to bed already!
> SciPy-user mailing list
More information about the SciPy-user