For Loop Over Numpy Array To Scalar Energy