eigh implementation inconsistency
I need to solve a symmetric generalized eigenvalue problem, so I have looked at the linalg module and found a thing that seems inconsistent to me. For general (unsymmetric) problems there is the 'eig' function which allows for solving both the regular (via *geev) and generalized (via *ggev) eigenvalue problems. On the other hand, the function 'eigh' for symmetric (or hermitian) problems does not allow the generalized problems, even though there are functions in lapack to do it (dsygv, chegv). I would modify eigh to accept an optional 'b' argument just like eig does. What must be done to have dsygv, chegv wrappers generated? They are not generated now, IMHO. r.
Robert Cimrman wrote:
I need to solve a symmetric generalized eigenvalue problem, so I have looked at the linalg module and found a thing that seems inconsistent to me.
For general (unsymmetric) problems there is the 'eig' function which allows for solving both the regular (via *geev) and generalized (via *ggev) eigenvalue problems.
On the other hand, the function 'eigh' for symmetric (or hermitian) problems does not allow the generalized problems, even though there are functions in lapack to do it (dsygv, chegv).
I would modify eigh to accept an optional 'b' argument just like eig does. What must be done to have dsygv, chegv wrappers generated? They are not generated now, IMHO.
r. _______________________________________________ Scipy-dev mailing list Scipy-dev@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-dev
Sounds good to me ! It would be a nice improvement. Nils
you can also have a look at the symeig module: http://mdp-toolkit.sourceforge.net/symeig.html it is a wrapper of all the generalized symmetric eigenvalues problem routines in lapack, i.e. EVR, GV, GVD, GVX, including those for extracting only a subset of eigenvalues. cheers, tiziano On 4/10/07, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
I need to solve a symmetric generalized eigenvalue problem, so I have looked at the linalg module and found a thing that seems inconsistent to me.
For general (unsymmetric) problems there is the 'eig' function which allows for solving both the regular (via *geev) and generalized (via *ggev) eigenvalue problems.
On the other hand, the function 'eigh' for symmetric (or hermitian) problems does not allow the generalized problems, even though there are functions in lapack to do it (dsygv, chegv).
I would modify eigh to accept an optional 'b' argument just like eig does. What must be done to have dsygv, chegv wrappers generated? They are not generated now, IMHO.
r. _______________________________________________ Scipy-dev mailing list Scipy-dev@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-dev
Tiziano Zito wrote:
you can also have a look at the symeig module: http://mdp-toolkit.sourceforge.net/symeig.html it is a wrapper of all the generalized symmetric eigenvalues problem routines in lapack, i.e. EVR, GV, GVD, GVX, including those for extracting only a subset of eigenvalues.
cheers, tiziano
This is great! Exactly what I am looking for... I assume you would not consider changing it license from LGPL to BSD so that it could be included in SciPy? :-) r.
We would change the license to whatever is needed to include it in SciPy, but I think the problem is that our pyf files (those needed by f2py to generate the C extension module) have been heavily (and manually :-)) tuned and do not resemble the pyf files used by scipy to generate other lapack wrappers. An inclusion "as is" has been excluded for this reason by Pearu a couple of years ago. Rewriting the pyf to match those of scipy is a tedious work that we are not going to do in the near future. Unless Pearu changed his mind or someone volunteers to do the hard work, in which case I would help as far as I can, it is not going to happen soon. bye, tiziano On 4/10/07, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
Tiziano Zito wrote:
you can also have a look at the symeig module: http://mdp-toolkit.sourceforge.net/symeig.html it is a wrapper of all the generalized symmetric eigenvalues problem routines in lapack, i.e. EVR, GV, GVD, GVX, including those for extracting only a subset of eigenvalues.
cheers, tiziano
This is great! Exactly what I am looking for... I assume you would not consider changing it license from LGPL to BSD so that it could be included in SciPy? :-)
r.
_______________________________________________ Scipy-dev mailing list Scipy-dev@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-dev
On Tue, 10 Apr 2007, Tiziano Zito apparently wrote:
We would change the license to whatever is needed to include it in SciPy, but I think the problem is that our pyf files (those needed by f2py to generate the C extension module) have been heavily (and manually :-)) tuned and do not resemble the pyf files used by scipy to generate other lapack wrappers. An inclusion "as is" has been excluded for this reason by Pearu a couple of years ago.
Even if a volunteer to rewrite the pyf files does not emerge immediately, changing the license *now* will ensure that some future interested party does not pass by the opportunity out of licensing concerns. fwiw, Alan Isaac
Alan G Isaac wrote:
On Tue, 10 Apr 2007, Tiziano Zito apparently wrote:
We would change the license to whatever is needed to include it in SciPy, but I think the problem is that our pyf files (those needed by f2py to generate the C extension module) have been heavily (and manually :-)) tuned and do not resemble the pyf files used by scipy to generate other lapack wrappers. An inclusion "as is" has been excluded for this reason by Pearu a couple of years ago.
Even if a volunteer to rewrite the pyf files does not emerge immediately, changing the license *now* will ensure that some future interested party does not pass by the opportunity out of licensing concerns.
What is more, once and if it is BSD-licensed, it could get included and _used_ from scipy sandbox just as it is right now. Later it could get merged into the main tree, if there is interest and will... Or a new scikit? regards, r.
participants (4)
-
Alan G Isaac -
Nils Wagner -
Robert Cimrman -
Tiziano Zito