diff --git a/tianshou/data/batch.py b/tianshou/data/batch.py index e270acc63..c8a3ea25b 100644 --- a/tianshou/data/batch.py +++ b/tianshou/data/batch.py @@ -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: