[SciPy-User] Vectorized newton function

josef.pktd at gmail.com josef.pktd at gmail.com
Thu Apr 15 10:39:57 EDT 2010


On Thu, Apr 15, 2010 at 10:35 AM, Gökhan Sever <gokhansever at gmail.com> wrote:
>
>
> On Wed, Apr 14, 2010 at 9:26 PM, Robert Kern <robert.kern at gmail.com> wrote:
>>
>> On Wed, Apr 14, 2010 at 19:33, Charles R Harris
>> <charlesr.harris at gmail.com> wrote:
>> >
>> > On Wed, Apr 14, 2010 at 6:15 PM, Gökhan Sever <gokhansever at gmail.com>
>> > wrote:
>> >>
>> >> Thanks Anne for suggesting "fsolve" and rest of the useful information.
>> >> Below is how my function is read:
>> >>
>> >> def myfunc(myarray):
>> >>        term1 = compute1_array1
>> >>        term2 = compute3_array2
>> >>        term3 = compute3_array3
>> >>        return term1+term2+term3
>> >>
>> >> result_arr = fsolve(myfunc, myarray)
>> >>
>> >> IDL handles univariate and multivariate cases using one fun newton
>> >> function. I get almost equivalent results using fsolve to IDL's newton.
>> >>
>> >
>> > The fsolve function is essentially multidimensional newton, IIRC.
>>
>> Yes, but it's an N**2 waste when the equations aren't coupled.
>
> Robert,
>
> Could you give an example what you mean here?

For example the Hessian in an uncoupled system is a diagonal matrix
but without restriction, the solver needs to calculate all n*(n-1)/2
terms, including those that are zero but the method doesn't know this.
Other operations also work on the full Hessian.

Josef

> --
> Gökhan
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>



More information about the SciPy-User mailing list