You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hierarchical clustering works under Python2.7 but fails under 3.5 #28
First, thanks for providing this library, it provided a very easy way to add a geographical clustering feature to a project I am working on (not presently in an open repository, but I am happy to send you and invite to view if it is of interest).
I recently returned to the body of code after a time and was trying to upgrade it from Python2.7 to Python3.5, and found that the HierarchicalCluster class throws an exception under 3.5 on data it processes flawlessly under 2.7.
I reduced the problem to a minimal test case, which follows at the end of this description.
I added some extra logging, and proved to my own satisfaction that the exception is thrown from logic around lines 5 to 25 of linkage.py which appear to relate to caching distance function results. Under 2.7 the a and b parameters in this passage appear to be clusters, whereas under 3.5 they appear to be the key strings.
This was tested under 1.4.1, originally with the .whl file from PyPi, but also with the source unpacked to a directory alongside my code.
Test case follows:
from cluster import HierarchicalClustering
import logging
I meant to add, that if I were able to work out what is going on and propose a fix I would issue a pull request.
I may try again at some time in the future, but right now it's half-past midnight and I have my day job to go to tomorrow.
The testing is being done on current macOS (not that I would expect that to make a difference).
Activity
tim-littlefair commentedon Mar 7, 2018
I meant to add, that if I were able to work out what is going on and propose a fix I would issue a pull request.
I may try again at some time in the future, but right now it's half-past midnight and I have my day job to go to tomorrow.
The testing is being done on current macOS (not that I would expect that to make a difference).
Merge branch 'tim-littlefair-master' into hotfix/1.4.1