| 1 |
Description: fix pickling error |
| 2 |
functions are pickleable only if they are defined at top level, lambda functions are |
| 3 |
not pickleable objects |
| 4 |
Author: Ananthu C V <[email protected]> |
| 5 |
Last-Update: 2026-05-22 |
| 6 |
--- a/cluster/test/test_hierarchical.py |
| 7 |
+++ b/cluster/test/test_hierarchical.py |
| 8 |
@@ -44,2 +44,4 @@ |
| 9 |
|
| 10 |
+def distance(x, y): |
| 11 |
+ return abs(x - y) |
| 12 |
|
| 13 |
@@ -164,4 +166,3 @@ |
| 14 |
def testMultiprocessing(self): |
| 15 |
|
| 16 |
|
| 17 |
+ cl = HierarchicalClustering(self.__data, distance, num_processes=4) |
| 18 |
new_data = [] |