[SciPy-user] Schur complement

Nils Wagner nwagner at mecha.uni-stuttgart.de
Wed May 26 11:30:11 EDT 2004


Pearu Peterson wrote:
> 
> On Wed, 26 May 2004, Nils Wagner wrote:
> 
> 
>>>In short, use
>>>
>>>def func(x):
>>>   return abs(schur(T(x[0])))
> 
>                            ^^^
> 
> 
>>I have modified my program.
>>
>>def func2(x):
>>  return abs(schur(T(x)))
>>
>>r6 = optimize.fsolve(func2,x0)
>>
>>Now I get
>>
>>Traceback (most recent call last):
>>ValueError: array too large for destination
> 
> 
> Compare my suggestion with your version of func2 (notice ^^^).
> 
> 
>>The requirement, i.e. func is real is not mentioned in help 
>>(optimize.fsolve). Am I missing something ?
> 
> 
> Notice that it also does not mention that func can be complex valued.
> Anyways, fsolve assumes real-valued functions - `.`. But it is also simple 
> to use fsolve for complex-valued functions: make sure that func returns real 
> and imaginary parts of a function value, also an initial value to 
> fsolve should be specified as a pair of real and imaginary parts of the 
> value.
> 
Dear Pearu,

Thank you very much for your help. Moreover, it would be very kind of 
you, if you could send me a short example for complex-valued functions 
as well.

Thanks in advance.

       Nils

> Pearu
> 
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
> 




More information about the SciPy-User mailing list