Skip to content

Commit

Permalink
Fix PEP8.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Duburcq committed Jul 21, 2020
1 parent ccde89e commit 2cb3a97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tianshou/data/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ def _parse_value(v: Any):
try:
return torch.stack(v)
except RuntimeError as e:
raise TypeError("Batch does not support non-stackable list/tuple "
"of torch.Tensor as unique value yet.") from e
raise TypeError("Batch does not support non-stackable iterable"
" of torch.Tensor as unique value yet.") from e
try:
v_ = _to_array_with_correct_type(v)
except ValueError as e:
raise TypeError("Batch does not support heterogeneous list/tuple "
"of tensors as unique value yet.") from e
raise TypeError("Batch does not support heterogeneous list/tuple"
" of tensors as unique value yet.") from e
if _is_batch_set(v):
v = Batch(v) # list of dict / Batch
else:
Expand Down

0 comments on commit 2cb3a97

Please sign in to comment.