You can find the average in the NumPy with the following code. If you want to learn Python, I highly recommend reading This Book.
Example 1
import numpy as np a = np.array([1, 2, 3, 4, 5]) average = np.average(a) print(average)
Output
3.0
Example 2
import numpy as np a = np.array([[1, 2, 3, 4, 5],[5, 10, 15, 20, 25]]) average = np.average(a) print(average)
9.0
People are also reading:
What is Computer Vision? Examples, Applications, Techniques
Books for Machine Learning (ML)