Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: Trying to understand working with dicts (http://www.velocityreviews.com/forums/t959453-re-trying-to-understand-working-with-dicts.html)

Peter Pearson 04-05-2013 04:05 PM

Re: Trying to understand working with dicts
 
On Fri, 5 Apr 2013 18:04:03 +0530, inshu chauhan <insideshoes@gmail.com> wrote:
> --089e0111cf5068b65204d99c4d46
> Content-Type: text/plain; charset=ISO-8859-1

[snip]
> Here in my part of the code where cc is a dictionary. I want to understand
> what actually cc.iterkeys() and cc[k] actually doing.
> I am already reading
> http://docs.python.org/2/library/std...tml#dict.items
> and http://www.tutorialspoint.com/python...dictionary.htm but still
> not very clear.
>
> cc = Computesegclass(segimage, refimage)
> for k in sorted(cc.iterkeys()):
> i = argmax(cc[k])
> print >> f, i+1


Is this a question about dictionaries, or a question
about Computesegclass? In either case, an experiment
without the added complexities of sorted() and argmax()
would be better.

--
To email me, substitute nowhere->spamcop, invalid->net.


All times are GMT. The time now is 12:44 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.