Skip to content

Commit

Permalink
Remove f string to fix Python 3.4 support (#2087)
Browse files Browse the repository at this point in the history
  • Loading branch information
collincchoy authored and neerajprad committed Oct 24, 2019
1 parent 70534a0 commit ec3e1e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyro/ops/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ def crps_empirical(pred, truth):
:rtype: torch.Tensor
"""
if pred.dim() != 1 + truth.dim() or pred.shape[1:] != truth.shape:
raise ValueError(f"Expected pred to have one extra sample dim on left. "
f"Actual shapes: {pred.shape} versus {truth.shape}")
raise ValueError("Expected pred to have one extra sample dim on left. "
"Actual shapes: {} versus {}".format(pred.shape, truth.shape))
opts = dict(device=pred.device, dtype=pred.dtype)
num_samples = pred.size(0)
if num_samples == 1:
Expand Down

0 comments on commit ec3e1e7

Please sign in to comment.