Do you know that the word "mean" has many meanings? Today we are going to introduce the word mean and its related functions.
The functions np.mean(a, axis=None, dtype=None, out=None, keepdims=False) and np.average(a, axis=None, weights=None, returned=False) provide us with a number of parameters, but the biggest difference is that np. The biggest difference is that np.average() provides a weight ratio (weights=False) while np.mean() provides axis retention (keepdims=False).
The parameter, (weights), provides us with the right to assign weights. If weights are not set again, the weight of each data item will be 1.
The parameters, (returned), give us the combination of weights to calculate.
The parameters, (keepdims), allow us to retain the original shape of the data.




請先 登入 以發表留言。