mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-22 07:02:19 +00:00
Fix non-used device argument in to_torch
conversion (#1107)
This commit is contained in:
@@ -94,9 +94,9 @@ def _numpy_iterable_to_torch(
|
||||
if hasattr(value, "_make"):
|
||||
# namedtuple - underline used to prevent potential name conflicts
|
||||
# noinspection PyProtectedMember
|
||||
return type(value)._make(numpy_to_torch(v) for v in value)
|
||||
return type(value)._make(numpy_to_torch(v, device) for v in value)
|
||||
else:
|
||||
return type(value)(numpy_to_torch(v) for v in value)
|
||||
return type(value)(numpy_to_torch(v, device) for v in value)
|
||||
|
||||
|
||||
class NumpyToTorch(gym.Wrapper, gym.utils.RecordConstructorArgs):
|
||||
|
Reference in New Issue
Block a user