Numpy Array Operations In Python For All Selected Lines