You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
some legacy code in weighted_metrics allows None arguments for the weights, then tests weights.ndim, so crashes if you dont pass weights. I would KWF but its used in performance metrics
def_weighted_geometric_mean(y, weights=None, axis=None):
"""Calculate weighted version of geometric mean. Parameters ---------- y : np.ndarray Values to take the weighted geometric mean of. weights: np.ndarray Weights for each value in `array`. Must be same shape as `array` or of shape `(array.shape[0],)` if axis=0 or `(array.shape[1], ) if axis=1. axis : int The axis of `y` to apply the weights to. Returns ------- geometric_mean : float Weighted geometric mean """ifweights.ndim==1:
Describe the bug
some legacy code in weighted_metrics allows None arguments for the weights, then tests weights.ndim, so crashes if you dont pass weights. I would KWF but its used in performance metrics
Steps/Code to reproduce the bug
Expected results
it should I think just require weights, otherwise whats the point?
Actual results
Versions
No response
The text was updated successfully, but these errors were encountered: