45212332826f081d5a467400eee8c80833a9a762,mathics/builtin/lists.py,FindClusters,_cluster,#FindClusters#Any#Any#Any#Any#Any#,3728
Before Change
py_method = None
method = self.get_option(options, "Method", evaluation)
if isinstance(method, String):
py_method = method.get_string_value()
elif isinstance(method, Symbol) and method.get_name().startswith("Global`"):
py_method = method.get_name()[len("Global`"):]
try:
if py_method == "Agglomerate":
clusters = agglomerate(repr_p, py_k, _PrecomputedDistances(df, dist_p, evaluation))
elif py_method == "Optimize":
After Change
elif method_string == "Optimize":
clusters = optimize(repr_p, py_k, _LazyDistances(df, dist_p, evaluation))
else:
evaluation.message("FindClusters", "bdmtd", Expression("Rule", "Method", method))
return
except _IllegalDistance as e:
evaluation.message("FindClusters", "xnum", e.distance)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: mathics/Mathics
Commit Name: 45212332826f081d5a467400eee8c80833a9a762
Time: 2016-08-22
Author: Bernhard.Liebl@gmx.org
File Name: mathics/builtin/lists.py
Class Name: FindClusters
Method Name: _cluster
Project Name: mathics/Mathics
Commit Name: 5a8afe8256c9586a9dff05e4c16b69d53f5857ae
Time: 2016-08-08
Author: 16sn6uv@gmail.com
File Name: mathics/builtin/inout.py
Class Name: On
Method Name: apply
Project Name: mathics/Mathics
Commit Name: 5a8afe8256c9586a9dff05e4c16b69d53f5857ae
Time: 2016-08-08
Author: 16sn6uv@gmail.com
File Name: mathics/builtin/inout.py
Class Name: Off
Method Name: apply