Closed jg-you closed 5 years ago
Geez! I guess close to release I started to get sloppy ; ). I'll take another pass to clean things up.
Nice!
While at it, it would probably be useful to support scikit style construction with clusterings declared as
[0,0,0,0,0,0,1,1,1,0,0,0]
etc. I can put a PR in for that.
Last issue I swear! While testing the code for PR #29 , I noticed that the constructor of the
Clustering
object is very sensitive to the type of input given.For example, when I construct a clustering from the following dictionary mapping clusters to elements
no warning are raised, yet a bunch of functions in the
sim
subpackage break down, because they expect a dictionary of sets.I think that it would be easy to cast all iterables to sets at construction time, but I don't know whether this would affect other parts of the code?