RosettaCodeData/Task/Sum-of-squares/Python/sum-of-squares-3.py
2019-09-12 10:33:56 -07:00

3 lines
64 B
Python

import numpy as np
a = np.array([1, 2, 3, 4, 5])
np.sum(a ** 2)