[SciPy-dev] GSoC weekly report
dmitrey
openopt@ukr....
Fri Jul 20 14:50:59 CDT 2007
hi all,
this week I was asked to close some tickets.
Unfortunately, I got to know that I should mention number of svn commits
to scipy too late, when I had already done the commits. Next time I will
wrote the svn commit numbers.
So
> http://projects.scipy.org/scipy/scipy/ticket/234
>
implementing possibility to turn off warnings about failing to solve in
leastsq and fsolve
done, same way as proposed
> http://projects.scipy.org/scipy/scipy/ticket/285
>
(bracket parameters)
this feature is still under discussion. Most of feedbacks lead to
chapter 3 of Alan Isaac proposition:
3. Move the brent `code` into a `Brent` class.
The `brent` function (with unchanged signature)
remains as a convenient user interface to the `Brent`
class, which can be used directly when more refined
control is needed. The class will include bracketing
parameters as a response to the ticket.
> http://projects.scipy.org/scipy/scipy/ticket/296
>
connecting tnc 1.3. In progress.
> http://projects.scipy.org/scipy/scipy/ticket/377
>
fmin_bfgs incorrectly expects a ZeroDivisonError
had fixed
> http://projects.scipy.org/scipy/scipy/ticket/390
>
scipy.optimize.fmin_bfgs fails without warning
I mentioned that the user func is incorrect for the solver - it's
non-convex and has lots of local minima, so obtaining different results
from different x0 is nothing special
> http://projects.scipy.org/scipy/scipy/ticket/399
>
connecting PSwarm. Since it requires connecting C code to python, Alan
agreed to freeze the ticket (I have no chance to do the ticket in
required time).
> http://projects.scipy.org/scipy/scipy/ticket/416
>
the ticket propose to modify something in C code (__minpack.h),
something related to transpose.
it says "MATRIXC2F transposing the wrong way in optimize.leastsq"
here's the defenition of MATRIXC2F from minpack.h (line 97), it comes
w/o any description & I can't understand what does it do:
#define MATRIXC2F(jac,data,n,m) {double *p1=(double *)(jac), *p2,
*p3=(double *)(data);\
int i,j;\
for (j=0;j<(m);p3++,j++) \
for (p2=p3,i=0;i<(n);p2+=(m),i++,p1++) \
*p1 = *p2; }
AJennings (author of the ticket) proposed to change the line 152
MATRIXC2F(fjac, result_array->data, *n, *ldfjac)
to
MATRIXC2F(fjac, result_array->data, *ldfjac, *n)
However, line 94 is the same as line 152, so, maybe, it also requires
the replacement.
Unfortunately, lots of other c-funcs are also undocumented, so I guess
it will take a significant time to fix the ticket.
> http://projects.scipy.org/scipy/scipy/ticket/344
ValueError: objects are not aligned in optimize.fmin_cg
The problem here was in dot([[a,b],[c,d]], [e,f]) statement (a,b,c, etc
are 1x1 ndarrays).
It formed 2x2x1 matrix (at least array(...).shape yields the answer
(2,2,1)), so multiplying it with [c,d] yields error.
I found nothing better than
arr = empty(2,2)
arr[0,0]=a
arr[0,1]=...
So now it works.
> http://projects.scipy.org/scipy/scipy/ticket/384
>
"tnc requires Python list, not numpy.ndarray". I think it's better to
connect tnc 1.3 before (i.e. close another ticket before doing this one)
> http://projects.scipy.org/scipy/scipy/ticket/389
>
initial guess to minimum is overwritten by the minimum
So I just set copy(x0) instead of x0 in cobyla.py, now it works.
> http://projects.scipy.org/scipy/scipy/ticket/388
>
remove uses of apply in optimize.py
done,
apply(func, ...) is replaced by func(*(...))
Regards, D.
More information about the Scipy-dev
mailing list