The inclination of the point product is correct, and it includes the amount you need. So, to get the sum of the products of the elements of the target array and set of weights:
>>> a = np.array([[0,1,2],[2,2,3]]) >>> a array([[0, 1, 2], [2, 2, 3]]) >>> weights = np.array([16,4,2]) >>> np.dot(a,weights) array([ 8, 46])
Karmel
source share