sum method over arrays in python
sum method over arrays in python
============================
sum method is used over arrays in python to return the
sun of all elements in an array
example:
from numpy import *
arr = array([1,2,3,4])
print("Original Array:", arr)
print("Sum value:", sum(arr))
output:
10
No comments:
Post a Comment