Skip to content

Commit

Permalink
additional check
Browse files Browse the repository at this point in the history
  • Loading branch information
jjshoots committed Aug 9, 2024
1 parent 05d10df commit f29ed0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wingman/replay_buffer/utils/listed_dict_to_dicted_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def listed_dict_to_dicted_list(
ptr[key_list[-1]] = np.stack(dicted_list, axis=0)
else:
ptr[key_list[-1]] = np.concatenate(dicted_list, axis=0)
elif isinstance(dicted_list[0], torch.Tensor) and len(dicted_list):
elif isinstance(dicted_list[0], torch.Tensor) and len(dicted_list[0].shape) > 0:
if stack:
ptr[key_list[-1]] = torch.stack(dicted_list, dim=0)
else:
Expand Down

0 comments on commit f29ed0e

Please sign in to comment.