On 17/07/2014 17:23, Jose Amoreira wrote:
Hello,
On 07/17/2014 12:05 AM, Alan Gauld wrote:
Just throwing this idea in without really thinking about it...
Would itertools.groupby work?
It takes a sorted collection and groups the items found based on a key
function. If the key function deemed t
Hello,
On 07/17/2014 12:05 AM, Alan Gauld wrote:
Just throwing this idea in without really thinking about it...
Would itertools.groupby work?
It takes a sorted collection and groups the items found based on a key
function. If the key function deemed two items identical if they were
within dist
On 16.07.2014 13:49, Jose Amoreira wrote:
Hello
I wrote a function that, given a list of numbers, finds clusters of
values by proximity and returns a reduced list containing the centers of
these clusters. However, I find it rather unclear. I would appreciate
any comments on how pythonic my functi
On 16/07/14 12:49, Jose Amoreira wrote:
Hello
I wrote a function that, given a list of numbers, finds clusters of
values by proximity and returns a reduced list containing the centers of
these clusters. However, I find it rather unclear. I would appreciate
any comments on how pythonic my function
Hi!
On 07/16/2014 10:14 PM, Wolfgang Maier wrote:
careful here: you just stored a tuple instead of a list; doesn't matter
for your current implementation, but may bite you at some point.
Oh, you're right. Silly mistake, even if harmless for the application I
have in mind.
else:
Hello
I wrote a function that, given a list of numbers, finds clusters of
values by proximity and returns a reduced list containing the centers of
these clusters. However, I find it rather unclear. I would appreciate
any comments on how pythonic my function is and suggestions to improve
its re