-
numpy.average
numpy.average(a, axis=None, weights=None, returned=False)
Compute the weighted average along the specified axis.
-
Parameters
Param Type Meaning a array_like Array containing data to be averaged. axis None or int or tuple of ints, optional Axis or axes along which to average a weights array_like, optional An array of weights associated with the values in a returned bool, optional If True, the tuple(average, sum_of_weights) is returned, otherwise only the average is returned. Returns, retval, [sum_of_weights] : array_type or double.
理解numpy.average
最新推荐文章于 2024-07-26 01:10:11 发布