Skip to content

Commit 628b884

Browse files
Louis Fauryvmoens
authored andcommitted
Fix test
1 parent df079ed commit 628b884

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchrl/data/tensor_specs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5750,7 +5750,7 @@ def rand(self, shape: torch.Size = None) -> TensorDictBase:
57505750
_dict,
57515751
batch_size=_size([*shape, *_remove_neg_shapes(self.shape)]),
57525752
device=self.device,
5753-
names=self.names,
5753+
names=self._td_dim_names,
57545754
)
57555755

57565756
def keys(
@@ -6031,7 +6031,7 @@ def zero(self, shape: torch.Size = None) -> TensorDictBase:
60316031
},
60326032
batch_size=_size([*shape, *self._safe_shape]),
60336033
device=device,
6034-
names=self.names,
6034+
names=self._td_dim_names,
60356035
)
60366036

60376037
def __eq__(self, other: object) -> bool:

0 commit comments

Comments
 (0)