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.

Screenshot 2021-06-07 105759.jpg

Screenshot 2021-06-07 110727.jpg

Screenshot 2021-06-07 111547.jpg

Screenshot 2021-06-07 112127.jpg

創作者介紹
創作者 Wayneezzzz 的頭像
Wayneezzzz

Wayneezzzz

Wayneezzzz 發表在 痞客邦 留言(0) 人氣( 1 )