Skip to content

Commit

Permalink
Fix line too long linting error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Zickel committed Mar 14, 2024
1 parent f6b993b commit d0aa2af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyro/ops/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ def weighed_quantile(input, probs, log_weights, dim=0):
weights = weights - weights.min(dim, keepdim=True)[0]
weights = weights / weights.max(dim, keepdim=True)[0]
# Calculate indices
indices_above = (weights[..., None] <= probs).sum(dim, keepdim=True).swapaxes(dim, -1).clamp(max=input.size(dim) - 1)[..., 0]
indices_above = (weights[..., None] <= probs).sum(dim, keepdim=True).swapaxes(dim, -1)
indices_above = indices_above.clamp(max=input.size(dim) - 1)[..., 0]
indices_below = (indices_above - 1).clamp(min=0)
# Calculate below and above qunatiles
quantiles_below = sorted_input.gather(dim, indices_below)
Expand Down

0 comments on commit d0aa2af

Please sign in to comment.