[Numpy-discussion] How to remove fortran-like loops with numpy?
Mon Jun 8 18:07:21 CDT 2009
On Mon, Jun 8, 2009 at 18:01, David Goldsmith<firstname.lastname@example.org> wrote:
> --- On Mon, 6/8/09, Anne Archibald <email@example.com> wrote:
>> > You can't, really. What you can do is just keep
>> iterating with the
>> > whole data set and ignore the parts that have already
>> converged. Here
>> > is an example:
>> Well, yes and no. This is only worth doing if the number of
>> points that require many iterations is small - not the case
>> without some sort of periodicity detection - but you can
>> keep an array
>> of not-yet-converged points, which you iterate. When some
>> you store them in a results array (with fancy indexing) and
>> them from your still-converging array.
> Thanks, Anne. This is the way I had anticipated implementing it myself eventually, but the "fancy-indexing" requirement has caused me to keep postponing it, waiting for some time when I'll have a hefty block of time to figure it out and then, inevitably, debug it. :( Also, the transfer of points from un-converged to converged - when that's a large number, might that not be a large time-suck compared to Rob's method? (Too bad this wasn't posted a couple weeks ago: I'd've had time then to implement your method and "race" it against Rob's, but alas, now I have this doc editing job...but that's a good thing, as my fractals are not yet making me any real money.) :-)
The advantage of my implementation is that I didn't have to think too
hard about it.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion