[SciPy-user] Easy way to make a block diagonal matrix?

josef.pktd@gmai... josef.pktd@gmai...
Wed May 20 17:59:02 CDT 2009


2009/5/20 Stéfan van der Walt <stefan@sun.ac.za>:
> 2009/5/20 Joseph Smidt <josephsmidt@gmail.com>:
>> Actually,  I don't know if you could submit this routine for inclusion
>> into scipy itself.  I'm sure there are lots of people who need to
>> create block diagonal arrays like this.  Plus, your script looks
>> really well written.
>
> I'd be glad if others find it useful.  I'm not quite sure where in
> SciPy it would go, though?
>

scipy.linalg has some matrix creation functions, some look like
duplicate functionality compared with numpy to me, this would be a
possible location (partially hidden in docs)

+   kron
+   hankel
+   toeplitz
+   tri
+   tril
+   triu

I think adding it to numpy instead, alongside kron and diag, might be
more appropriate.

Josef


More information about the SciPy-user mailing list