How to use the NumPy sum function?