[SciPy-Dev] balancing matrices before computing eigenvalues

Jason Grout jason-sage@creativetrax....
Fri Sep 16 19:23:40 CDT 2011

On 9/16/11 7:10 PM, Pauli Virtanen wrote:
> Fri, 16 Sep 2011 03:29:49 -0500, Jason Grout wrote:
> [clip]
>> before computing the eigenvalues/eigenvectors [1].  Presumably, they use
>> something like dgebal or dggbal [2] from lapack. Does scipy do any sort
>> of balancing before computing eigenvalues/eigenvectors?
> Scipy and Numpy call directly LAPACK's DGEEV. This routine does
> internally call DGEBAL to do balancing, which is what I believe
> Matlab's documentation refers to. Balancing can in some cases in
> fact be a source of additional errors -- see LAPACK Errata #0057
> -- so it may be useful to actually turn it off sometimes.
> So it seems not so sure the balancing is an issue here.
> Having different versions of LAPACK etc. may also matter.

Thanks for the clarification.  Matlab has a 'nobalance' option to turn 
off the balancing---maybe the only reason they specifically said they 
balanced the matrices was to point out what the nobalance option was.

The two different computations were on two different computers, so it's 
possible that different versions of LAPACK might have caused the 
problems.  I'll see about possibly trying to track down things a bit 



More information about the SciPy-Dev mailing list