Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 66)
66.
How can you calculate the sum of all elements in a NumPy array arr?
arr.sum()
np.add(arr)
np.sum(arr)
arr.calculate_sum()
Answer: Option
Explanation:
The np.sum() function calculates the sum of all elements in the array.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.