# File lib/classifier/extensions/vector.rb, line 10 def sum inject(0) { |sum,term| sum += term }.to_f end