I would just import numpy as np and prefix the calls to array and sum below, to make it more obvious that we're using NumPy in the code.