In http://kmdaily.pastebin.com/d4c9b8909?
There are two for loops (lines 36-38 and 55-61)...and two mappings created - one is not used, just instantiated (line 24). I'm starting to remove lines as I type. Kenny On Jun 16, 10:04 am, Christopher Lee <l...@chem.ucla.edu> wrote: > On Jun 16, 2009, at 9:40 AM, Kenny Daily wrote: > > > > > When I comment out building the mapping.Mapping from > > the iteration I'm doing, I get the correct counts using itervalues: > > > # use itervalues...doesn't iterate through all events! > > n = 0 > > x = 0 > > for (n, event) in enumerate(events.itervalues()): > > if event.clusterid: > > x += 1 > > # cluster = clusters[event.clusterid + 1] > > # es = M.get(cluster, []) > > # es.append(event) > > # M[cluster] = es > > > print "With itervalues, number of events seen: = %s, x = %s" % > > (n,x) > > M.close() > > > Output: > > > With itervalues, number of events seen: = 247911, x = 247910 > > Hi Kenny, > sounds like we are closing in on the cause of the problem, to these > four lines you just commented out. Can you narrow it down further, to > a single line? > > The code you posted to pastebin doesn't seem to match the code you > quote above (specifically, there is no Mapping at all in the posted > code). Could you post two versions of your test script, one which > exhibits the incomplete count problem, vs. one that does not > (presumably due to commenting out the Mapping lines)? Your latest > scripts don't seem to have any Mapping code, and I am unable to find > your older script that had those lines... I really want to resolve > this! > > -- Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pygr-dev" group. To post to this group, send email to pygr-dev@googlegroups.com To unsubscribe from this group, send email to pygr-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pygr-dev?hl=en -~----------~----~----~----~------~----~------~--~---