Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #72.8K
~3K People Reached
Favorite Forums
Favorite Tags
2 Posted Topics
I happened to see (and isolate) the following problem and have 2 questions: 1) tkMessageBox is used extensively in my code. How do I make my code work without a significant re-write? 2) how do I tell the wonderful tkinter developers that there is a problem? The problem is seen …
You could just take the average using pylab: >>> import pylab >>> grid = pylab.array[[0, 0, 0, 0, 0], [0, 1, 1, 1, 0], [0, 1, 1, 0, 0], [0, 1, 1, 1, 0], [0, 0, 0 ,0, 0]] >>> ( pylab.average(pylab.array(grid.nonzero())[1,:]), pylab.average(pylab.array(grid.nonzero())[0,:]) ) (1.875, 2.0)
The End.
no_spam_for_dan