[Tutor] Python execution timer/proficiency testing

Oscar Benjamin oscar.j.benjamin at gmail.com
Tue Aug 27 12:37:37 CEST 2013


On 27 August 2013 11:03, eryksun <eryksun at gmail.com> wrote:
> On Tue, Aug 27, 2013 at 2:18 AM, Steven D'Aprano <steve at pearwood.info> wrote:
>> On Mon, Aug 26, 2013 at 08:20:30PM +0200, Dino Bektešević wrote:
>>
>>> Warning (from warnings module):
>>>   File "/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py", line
>>> 152
>>>     warnings.warn(msg, RuntimeWarning)
>>> RuntimeWarning: The iteration is not making good progress, as measured by
>>> the improvement from the last ten iterations.
>>>
>>> It doesn't seem to produce any error in my data, but how dangerous is this?
>>
>> That's just telling you that your code is slow.
>>
>> I say "your code", but it might be scipy, numpy, or code you wrote
>> yourself. Or it might simply be that the task you are trying to do is
>> hard, and no matter what you do it will always be slow. I'm afraid that
>> it will probably take a numpy/scipy expert to tell you which is the
>> case.
>
> The MINPACK routine called by fsolve() failed to converge; it quit
> after making little or no progress over 10 consecutive iterations.
> Maybe you need a better initial estimate; maybe there's no solution.

Exactly. Dino, whatever scipy routine you're using is warning you that
it has failed. You should heed this warning since it likely means that
your code is not doing what you want it to do. Without knowing what
you're trying to do and what function you're calling I can't say more
than that.


Oscar


More information about the Tutor mailing list