[SciPy-Dev] Sylvester equation solver for complex matrices

Warren Weckesser warren.weckesser@enthought....
Wed Feb 15 12:42:04 CST 2012


On Sat, Feb 11, 2012 at 11:24 AM, Warren Weckesser <
warren.weckesser@enthought.com> wrote:

>
>
> On Sat, Feb 11, 2012 at 4:45 AM, Nils Wagner <nwagner@iam.uni-stuttgart.de
> > wrote:
>
>> Hi all,
>>
>> I run a short test on the recent solver for Sylvester
>> equations.
>> In case of complex input matrices the method returns
>>  ** On entry to ZTRSYL parameter number  2 had an illegal
>> value
>>
>> Nils
>>
>>
>
> Thanks, Nils.  The new solve_sylvester function didn't handle complex
> matrices correctly. I have submitted a pull request (
> https://github.com/scipy/scipy/pull/155) that should fix this.
>
> Warren
>
>

Nils, the fix has been committed to the master branch.   Let us know if you
find any other problems.

Warren



>
>> import numpy as np
>> from scipy import linalg as la
>> np.random.seed(10)
>> a = np.random.rand(20,20)+1j*np.random.rand(20,20)
>> b = np.random.rand(20,20)+1j*np.random.rand(20,20)
>> q = np.random.rand(20,20)+1j*np.random.rand(20,20)
>>
>> x = la.solve_sylvester(a,b,q)
>> res = la.norm(np.dot(a,x)+np.dot(x,b)-q)
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20120215/ccc44240/attachment.html 


More information about the SciPy-Dev mailing list