ENH: Use center_of_mass instead of argmax for better precision.