2. Numpy operations
import numpy as npround()
weight = [100.56, 300.76, 500.897, 200.453]
arr = np.array(weight)
arr = np.round(weight, 1)
arrarray([100.6, 300.8, 500.9, 200.5])sum()
np.sum(arr)max()
min()
mean
arange()
random
random.randint()
random.uniform()
random.choice()
Example: Create a dictionary using random values
Assignments
Last updated