I am not sure any more. Check the docstring of hierarchy.linkage: I have in mind that when we give it this input format, the affinity argument is ignored.