Description: fix pickling error functions are pickleable only if they are defined at top level, lambda functions are not pickleable objects Author: Ananthu C V Last-Update: 2026-05-22 --- a/cluster/test/test_hierarchical.py +++ b/cluster/test/test_hierarchical.py @@ -44,2 +44,4 @@ +def distance(x, y): + return abs(x - y) @@ -164,4 +166,3 @@ def testMultiprocessing(self): - cl = HierarchicalClustering(self.__data, lambda x, y: abs(x - y), - num_processes=4) + cl = HierarchicalClustering(self.__data, distance, num_processes=4) new_data = []