find the average of an array in numpy code example Example: numpy average import numpy as np a = np.arange(6).reshape(3,2) average = np.average(a)