'Classify a point against k nearest
in the training data, return label.'

def classify(self, point, k=3):

    dist = array([L2dist(point, s) for s in self.samples])
    ndx = dist.argsort()
    votes = {}
    for i in range(k):
        label = self.labels[ndx[i]]
        votes.setdefault(label, 0)
        votes[label] += 1
    return max(votes)
