[SciPy-dev] band matrix wrapping ready for inclusion
arnd.baecker at web.de
Fri Jun 30 07:58:47 CDT 2006
On Fri, 30 Jun 2006, Nils Wagner wrote:
> Arnd Baecker wrote:
> > On Thu, 29 Jun 2006, Travis Oliphant wrote:
> >> Arnd Baecker wrote:
> >>> Hi,
> >>> sorry for asking again, but I would really be happy
> >>> to get this finished...
> >>> Travis, Robert or Pearu: may I go ahead with integrating
> >>> the band matrix wrappers into scipy svn?
> >> I say go ahead. It looks like an additional feature with a reasonable
> >> interface that should not affect other code.
> > Many thanks, code is commited. All tests pass without problems.
> > Best, Arnd
> > _______________________________________________
> > Scipy-dev mailing list
> > Scipy-dev at scipy.org
> > http://projects.scipy.org/mailman/listinfo/scipy-dev
> Hi Arnd,
> Thank you very much for the support of band matrices in scipy. That is
> very useful.
> BTW, is it possible to convert full matrices to band matrices and vice
> versa ?
For an example of the conversion of a full matrix to band
where you find code blocks like
# Extract upper bands from symmetric and hermitian band matrices
# (for use in dsbevd, dsbevx, zhbevd, zhbevx
# and their single precision versions)
LDAB = self.KU + 1
self.bandmat_sym = zeros((LDAB, N), dtype=float)
self.bandmat_herm = zeros((LDAB, N), dtype=complex)
for i in xrange(LDAB):
self.bandmat_sym[LDAB-i-1,i:N] = diag(self.sym_mat, i)
self.bandmat_herm[LDAB-i-1,i:N] = diag(self.herm_mat, i)
More information about the Scipy-dev