If you need efficient vector arithmetic, try Numpy.

&gt;&gt;&gt; import numpy
&gt;&gt;&gt; a=numpy.array([0,1,2])
&gt;&gt;&gt; b=numpy.array([3,4,5])
&gt;&gt;&gt; a+b
array([3, 5, 7])
&gt;&gt;&gt;


Or (thanks, Andrew Jaffe), 

&gt;&gt;&gt; a += b
&gt;&gt;&gt; a
array([3, 5, 7])
&gt;&gt;&gt;


Concise vector adding in Python?
I'm setting file name like 'abc_1.pdf' where '1' is the value of a model's attribute. But brakeman scanner take this as security issue. I need to keep track of files by referencing file name with model attribute. Can you please tell me, what is the right way to fix this security issue?

Thanks.
