scikit-learn/scikit-learn — pull request #3134 by jrouly (2014-05-06 04:44:14+00:00)
Title: Broken string value comparison method in Affinity Propagation

The old code used 'is' instead of '==' to compare the user defined value of the 'affinity' parameter for the Affinity Propagation constructor. This causes problems when the input value is retrieved from an external source such as a file because the ID of the values will never be equivalent since they are stored in different locations in memory. '==' should be used to compare the string values instead of the string IDs.